Index: openacs-4/packages/acs-subsite/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/package-procs.tcl,v diff -u -r1.25.4.3 -r1.25.4.4 --- openacs-4/packages/acs-subsite/tcl/package-procs.tcl 10 Oct 2013 21:00:45 -0000 1.25.4.3 +++ openacs-4/packages/acs-subsite/tcl/package-procs.tcl 27 Oct 2013 14:26:46 -0000 1.25.4.4 @@ -147,8 +147,7 @@ if { $supertype ne "" && $object_name ne "" } { foreach row [util_memoize "package_table_columns_for_type \"$supertype\""] { - set table_name [lindex $row 0] - set column_name [lindex $row 1] + lassign $row table_name column_name # Note that limit_to doesn't apply here as we always need # to include these arguments else the call will fail @@ -321,9 +320,8 @@ } foreach pair $plsql { - set type [lindex $pair 0] - set stmt_name [lindex $pair 1] - set code [lindex $pair 2] + lassign $pair type stmt_name code + db_exec_plsql $stmt_name $code # Let's check to make sure the package is valid @@ -839,9 +837,7 @@ set pieces [list] foreach pair $var_list { - - set __key [lindex $pair 0] - set __value [lindex $pair 1] + lassign $pair __key __value if { ![info exists real_params([string toupper $__key])] } { # The parameter is not accepted as a parameter to the # pl/sql function. Ignore it. @@ -959,8 +955,7 @@ set pieces [list] foreach pair $var_list { - set __key [lindex $pair 0] - set __value [lindex $pair 1] + lassign $pair __key __value if { ![info exists real_params([string toupper $__key])] } { # The parameter is not accepted as a parameter to the # pl/sql function. Ignore it. Index: openacs-4/packages/acs-subsite/tcl/plpgsql-utility-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/plpgsql-utility-procs.tcl,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/acs-subsite/tcl/plpgsql-utility-procs.tcl 5 Oct 2013 13:02:12 -0000 1.5.2.1 +++ openacs-4/packages/acs-subsite/tcl/plpgsql-utility-procs.tcl 27 Oct 2013 14:26:46 -0000 1.5.2.2 @@ -58,8 +58,8 @@ # For each real arg, append default or supplied arg value set pieces [list] foreach row $real_args { - set arg_name [lindex $row 0] - set arg_default [lindex $row 1] + lassign $row arg_name arg_default + if { [info exists user_supplied($arg_name)] } { lappend pieces "${prepend}$user_supplied($arg_name)" } else { Index: openacs-4/packages/acs-subsite/tcl/plsql-utility-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/plsql-utility-procs.tcl,v diff -u -r1.2.10.3 -r1.2.10.4 --- openacs-4/packages/acs-subsite/tcl/plsql-utility-procs.tcl 10 Oct 2013 21:00:45 -0000 1.2.10.3 +++ openacs-4/packages/acs-subsite/tcl/plsql-utility-procs.tcl 27 Oct 2013 14:26:46 -0000 1.2.10.4 @@ -111,8 +111,7 @@ set text "" set col_width [expr {$max_length + $num_spaces}] foreach pair $pieces { - set left [lindex $pair 0] - set right [lindex $pair 1] + lassign $pair left right while { [string length $left] < $col_width } { append left " " } Index: openacs-4/packages/acs-subsite/tcl/subsite-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-callback-procs.tcl,v diff -u -r1.6 -r1.6.6.1 --- openacs-4/packages/acs-subsite/tcl/subsite-callback-procs.tcl 3 Apr 2010 23:13:47 -0000 1.6 +++ openacs-4/packages/acs-subsite/tcl/subsite-callback-procs.tcl 27 Oct 2013 14:26:46 -0000 1.6.6.1 @@ -62,8 +62,7 @@ set package_id [ad_conn package_id] foreach row $callback_list { - set callback [lindex $row 0] - set type [lindex $row 1] + lassign $row callback type switch -- $type { tcl { Index: openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl,v diff -u -r1.43.8.1 -r1.43.8.2 --- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 27 Aug 2013 12:20:36 -0000 1.43.8.1 +++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 27 Oct 2013 14:26:46 -0000 1.43.8.2 @@ -903,12 +903,10 @@ util_driver_info -array request - set headers [ns_conn headers] - set host_addr [split [ns_set iget $headers host] :] - set request(vhost) [lindex $host_addr 0] + lassign [split [ns_set iget [ns_conn headers] host] :] request(vhost) provided_port - if {[lindex $host_addr 1] ne "" } { - set request(port) [lindex $host_addr 1] + if {$provided_port ne "" } { + set request(port) $provided_port } set request_vhost_p [expr {$main_host ne $request(vhost) }] Index: openacs-4/packages/acs-subsite/www/admin/groups/new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/groups/new.tcl,v diff -u -r1.6.10.5 -r1.6.10.6 --- openacs-4/packages/acs-subsite/www/admin/groups/new.tcl 10 Oct 2013 21:00:46 -0000 1.6.10.5 +++ openacs-4/packages/acs-subsite/www/admin/groups/new.tcl 27 Oct 2013 14:26:46 -0000 1.6.10.6 @@ -147,8 +147,7 @@ set package_url [ad_conn package_url] foreach group_rel_type $group_rel_type_list { - set next_group_id [lindex $group_rel_type 0] - set next_rel_type [lindex $group_rel_type 1] + lassign $group_rel_type next_group_id next_rel_type lappend return_url_list \ "${package_url}admin/relations/add?group_id=$next_group_id&rel_type=[ad_urlencode $next_rel_type]&party_id=$group_id&allow_out_of_scope_p=t" } Index: openacs-4/packages/acs-subsite/www/admin/parties/new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/parties/new.tcl,v diff -u -r1.6.10.5 -r1.6.10.6 --- openacs-4/packages/acs-subsite/www/admin/parties/new.tcl 10 Oct 2013 21:00:46 -0000 1.6.10.5 +++ openacs-4/packages/acs-subsite/www/admin/parties/new.tcl 27 Oct 2013 14:26:47 -0000 1.6.10.6 @@ -194,8 +194,7 @@ # there may be more segments to put this new party in before the # user's original request is complete. So build a return_url stack foreach group_rel_type $group_rel_type_list { - set next_group_id [lindex $group_rel_type 0] - set next_rel_type [lindex $group_rel_type 1] + lassign $group_rel_type next_group_id next_rel_type lappend return_url_list \ "../relations/add?group_id=$next_group_id&rel_type=[ad_urlencode $next_rel_type]&party_id=$party_id&allow_out_of_scope_p=t" } Index: openacs-4/packages/acs-subsite/www/admin/users/new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/users/new.tcl,v diff -u -r1.12.6.5 -r1.12.6.6 --- openacs-4/packages/acs-subsite/www/admin/users/new.tcl 10 Oct 2013 21:00:46 -0000 1.12.6.5 +++ openacs-4/packages/acs-subsite/www/admin/users/new.tcl 27 Oct 2013 14:26:47 -0000 1.12.6.6 @@ -201,8 +201,7 @@ # there may be more segments to put this new party in before the # user's original request is complete. So build a return_url stack foreach group_rel_type $group_rel_type_list { - set next_group_id [lindex $group_rel_type 0] - set next_rel_type [lindex $group_rel_type 1] + lassign $group_rel_type next_group_id next_rel_type lappend return_url_list \ "../relations/add?group_id=$next_group_id&rel_type=[ad_urlencode $next_rel_type]&party_id=$user_id&allow_out_of_scope_p=t" }