Index: openacs-4/packages/acs-subsite/www/admin/relations/remove-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/relations/remove-2.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-subsite/www/admin/relations/remove-2.tcl 19 Jan 2018 14:09:48 -0000 1.6 +++ openacs-4/packages/acs-subsite/www/admin/relations/remove-2.tcl 7 Jun 2018 17:46:16 -0000 1.7 @@ -2,7 +2,7 @@ ad_page_contract { Removes relations - + @author Michael Bryzek (mbryzek@arsdigita.com) @creation-date 2000-12-16 @cvs-id $Id$ @@ -12,23 +12,23 @@ { return_url:localurl "" } } -validate { permission_p -requires {rel_id:notnull} { - if { ![relation_permission_p -privilege delete $rel_id] } { - ad_complain "The relation either does not exist or you do not have permission to remove it" - } + if { ![permission::permission_p -object_id $rel_id -privilege "delete"] } { + ad_complain "The relation either does not exist or you do not have permission to remove it" + } } } if {$operation eq "Yes, I really want to remove this relation"} { db_transaction { - relation_remove $rel_id + relation_remove $rel_id } on_error { - ad_return_error "Error creating the relation" "We got the following error while trying to remove the relation:
$errmsg
" - ad_script_abort + ad_return_error "Error creating the relation" "We got the following error while trying to remove the relation:
$errmsg
" + ad_script_abort } } else { if { $return_url eq "" } { - # redirect to the relation by default, if we haven't deleted it - set return_url [export_vars -base one rel_id] + # redirect to the relation by default, if we haven't deleted it + set return_url [export_vars -base one rel_id] } }