Fisheye: Tag 1.1.20.1 refers to a dead (removed) revision in file `openacs-4/packages/categories/www/cadmin/category-link-add-4-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.20.1 refers to a dead (removed) revision in file `openacs-4/packages/categories/www/cadmin/category-link-add-4-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/categories/www/cadmin/category-link-add-4.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/category-link-add-4.tcl,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/categories/www/cadmin/category-link-add-4.tcl 29 Jun 2018 17:27:18 -0000 1.8 +++ openacs-4/packages/categories/www/cadmin/category-link-add-4.tcl 15 Mar 2019 11:38:27 -0000 1.8.2.1 @@ -17,11 +17,31 @@ permission::require_permission -object_id $tree_id -privilege category_tree_write db_transaction { - foreach forward_category_id [db_list check_link_forward_permissions ""] { + foreach forward_category_id [db_list check_link_forward_permissions [subst { + select c.category_id as link_category_id + from categories c + where c.category_id in ([join $link_category_id ,]) + and acs_permission.permission_p(c.tree_id,:user_id,'category_tree_write') = 't' + and c.category_id <> :category_id + and not exists (select 1 + from category_links l + where l.from_category_id = :category_id + and l.to_category_id = c.category_id) + }]] { category_link::add -from_category_id $category_id -to_category_id $forward_category_id } - foreach backward_category_id [db_list check_link_backward_permissions ""] { + foreach backward_category_id [db_list check_link_backward_permissions [subst { + select c.category_id as link_category_id + from categories c + where c.category_id in ([join $link_category_id ,]) + and acs_permission.permission_p(c.tree_id,:user_id,'category_tree_write') = 't' + and c.category_id <> :category_id + and not exists (select 1 + from category_links l + where l.from_category_id = c.category_id + and l.to_category_id = :category_id) + }]] { category_link::add -from_category_id $backward_category_id -to_category_id $category_id } } on_error { Fisheye: Tag 1.1.20.1 refers to a dead (removed) revision in file `openacs-4/packages/categories/www/cadmin/category-link-add-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.20.1 refers to a dead (removed) revision in file `openacs-4/packages/categories/www/cadmin/category-link-add-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/categories/www/cadmin/category-link-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/category-link-add.tcl,v diff -u -r1.7 -r1.7.2.1 --- openacs-4/packages/categories/www/cadmin/category-link-add.tcl 29 Jun 2018 17:27:18 -0000 1.7 +++ openacs-4/packages/categories/www/cadmin/category-link-add.tcl 15 Mar 2019 11:41:37 -0000 1.7.2.1 @@ -34,7 +34,11 @@ template::multirow create trees tree_name tree_id link_add_url -db_foreach get_trees_to_link "" { +db_foreach get_trees_to_link { + select tree_id as link_tree_id + from category_trees + where acs_permission.permission_p(tree_id,:user_id,'category_tree_write') = 't' +} { set tree_name [category_tree::get_name $link_tree_id $locale] template::multirow append trees $tree_name $link_tree_id \ [export_vars -no_empty -base category-link-add-2 { link_tree_id category_id tree_id locale object_id ctx_id}] Index: openacs-4/packages/categories/www/cadmin/category-link-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/cadmin/category-link-add-3.tcl,v diff -u -r1.8 -r1.8.2.1 --- openacs-4/packages/categories/www/cadmin/category-link-add-3.tcl 29 Jun 2018 17:27:18 -0000 1.8 +++ openacs-4/packages/categories/www/cadmin/category-link-add-3.tcl 15 Mar 2019 11:44:09 -0000 1.8.2.1 @@ -17,7 +17,17 @@ permission::require_permission -object_id $tree_id -privilege category_tree_write db_transaction { - foreach link_category_id [db_list check_link_target_permissions ""] { + foreach link_category_id [db_list check_link_target_permissions [subst { + select c.category_id as link_category_id + from categories c + where c.category_id in ([join $link_category_id ,]) + and acs_permission.permission_p(c.tree_id,:user_id,'category_tree_write') = 't' + and c.category_id <> :category_id + and not exists (select 1 + from category_links l + where l.from_category_id = :category_id + and l.to_category_id = c.category_id) + }]] { category_link::add -from_category_id $category_id -to_category_id $link_category_id } } on_error {