Index: openacs-4/packages/acs-subsite/www/permissions/perm-modify.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/perm-modify.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/permissions/perm-modify.tcl 24 Mar 2018 00:14:57 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/permissions/perm-modify.tcl 23 Apr 2018 21:32:46 -0000 1.8 @@ -12,17 +12,15 @@ foreach elm $perm { set elmv [split $elm ","] - set party_id [lindex $elmv 0] - set priv [lindex $elmv 1] + lassign $elmv party_id priv if { $priv ne "remove" } { set perm_array($elm) add } } foreach elm $perm { set elmv [split $elm ","] - set party_id [lindex $elmv 0] - set priv [lindex $elmv 1] + lassign $elmv party_id priv if {$priv eq "remove"} { foreach priv $privs { if { [info exists perm_array(${party_id},${priv})] } { @@ -49,16 +47,15 @@ set perm_array(${grantee_id},${privilege}) nothing } } - + # run through the perm_array, and depending on the value # remove: Remove the privilege # nothing: Do nothing # add: Add the privilege foreach elm [array names perm_array] { set elmv [split $elm ","] - set party_id [lindex $elmv 0] - set privilege [lindex $elmv 1] - + lassign $elmv party_id privilege + switch -- $perm_array($elm) { remove { permission::revoke -party_id $party_id -object_id $object_id -privilege $privilege Index: openacs-4/packages/acs-subsite/www/permissions/revoke-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/revoke-2.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-subsite/www/permissions/revoke-2.tcl 19 Jan 2018 14:09:48 -0000 1.9 +++ openacs-4/packages/acs-subsite/www/permissions/revoke-2.tcl 23 Apr 2018 21:32:46 -0000 1.10 @@ -16,11 +16,10 @@ if {$operation eq "Yes"} { db_transaction { - foreach item $revoke_list { - set party_id [lindex $item 0] - set privilege [lindex $item 1] + foreach item $revoke_list { + lassign $item party_id privilege permission::revoke -party_id $party_id -object_id $object_id -privilege $privilege - } + } } } Index: openacs-4/packages/acs-subsite/www/permissions/revoke.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/revoke.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/permissions/revoke.tcl 7 Aug 2017 23:47:59 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/permissions/revoke.tcl 23 Apr 2018 21:32:46 -0000 1.8 @@ -31,10 +31,9 @@ }] foreach item $revoke_list { - set party_id [lindex $item 0] - set privilege [lindex $item 1] + lassign $item party_id privilege append body [subst { -
  • [db_string party_name {}]
  • +
  • [db_string party_name {}]
  • }] } @@ -46,7 +45,7 @@ foreach item $revoke_list { append body [subst { - + }] } Index: openacs-4/packages/acs-templating/tcl/util-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/util-procs.tcl,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-templating/tcl/util-procs.tcl 1 Feb 2018 21:26:36 -0000 1.35 +++ openacs-4/packages/acs-templating/tcl/util-procs.tcl 23 Apr 2018 21:32:46 -0000 1.36 @@ -321,10 +321,7 @@ upvar $array_ref array foreach pair $lists { - - set key [lindex $pair 0] - set value [lindex $pair 1] - + lassign $pair key value set array($key) $value } }