Index: openacs-4/packages/categories/www/cadmin/category-links-view-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/category-links-view-oracle.xql,v diff -u -N --- openacs-4/packages/categories/www/cadmin/category-links-view-oracle.xql 8 Feb 2004 17:30:45 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,22 +0,0 @@ - - - - oracle8.1.6 - - - - - select c.category_id as linked_category_id, c.tree_id as linked_tree_id, l.link_id, - (case when l.from_category_id = :category_id then 'f' else 'r' end) as direction, - acs_permission.permission_p(c.tree_id,:user_id,'category_tree_write') as write_p - from category_links l, categories c - where (l.from_category_id = :category_id - and l.to_category_id = c.category_id) - or (l.from_category_id = c.category_id - and l.to_category_id = :category_id) - - - - - - Index: openacs-4/packages/categories/www/cadmin/category-links-view-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/category-links-view-postgresql.xql,v diff -u -N --- openacs-4/packages/categories/www/cadmin/category-links-view-postgresql.xql 8 Feb 2004 17:30:45 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,22 +0,0 @@ - - - - postgresql7.1 - - - - - select c.category_id as linked_category_id, c.tree_id as linked_tree_id, l.link_id, - (case when l.from_category_id = :category_id then 'f' else 'r' end) as direction, - acs_permission__permission_p(c.tree_id,:user_id,'category_tree_write') as write_p - from category_links l, categories c - where (l.from_category_id = :category_id - and l.to_category_id = c.category_id) - or (l.from_category_id = c.category_id - and l.to_category_id = :category_id) - - - - - - Index: openacs-4/packages/categories/www/cadmin/category-links-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/category-links-view.tcl,v diff -u -N -r1.11 -r1.11.2.1 --- openacs-4/packages/categories/www/cadmin/category-links-view.tcl 29 Jun 2018 17:27:18 -0000 1.11 +++ openacs-4/packages/categories/www/cadmin/category-links-view.tcl 15 Mar 2019 12:02:14 -0000 1.11.2.1 @@ -92,10 +92,18 @@ } } -db_multirow category_links get_category_links "" - -multirow extend category_links delete_url tree_view_url category_view_url tree_name category_name -multirow foreach category_links { +db_multirow -extend { + category_links delete_url tree_view_url category_view_url tree_name category_name +} category_links get_category_links { + select c.category_id as linked_category_id, c.tree_id as linked_tree_id, l.link_id, + (case when l.from_category_id = :category_id then 'f' else 'r' end) as direction, + acs_permission.permission_p(c.tree_id,:user_id,'category_tree_write') as write_p + from category_links l, categories c + where (l.from_category_id = :category_id + and l.to_category_id = c.category_id) + or (l.from_category_id = c.category_id + and l.to_category_id = :category_id) +} { set delete_url [export_vars -no_empty -base category-link-delete { link_id category_id tree_id locale object_id ctx_id}] set tree_view_url [export_vars -no_empty -base tree-view { {tree_id $linked_tree_id} locale object_id ctx_id}] set category_view_url [export_vars -no_empty -base category-links-view { {category_id $linked_category_id} {tree_id $linked_tree_id} locale object_id ctx_id}]