Index: openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl 7 Apr 2018 19:41:47 -0000 1.21 +++ openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl 30 Apr 2018 12:45:00 -0000 1.22 @@ -3,9 +3,9 @@ @author Peter Marklund (peter@collaboraid.biz) @creation-date 8 October 2002 - @cvs-id $Id$ + @cvs-id $Id$ } { - version_id:naturalnum,notnull + version_id:naturalnum,notnull {files:multiple,notnull} {file_action:multiple} {number_of_keys:integer,notnull ""} @@ -68,8 +68,7 @@ ns_log Notice "Replacing text in file $text_file with message tags" append processing_html_result "

Text replacements for $text_file

" set adp_text_result_list [lang::util::replace_adp_text_with_message_tags "$::acs::rootdir/$text_file" write $message_key_list] - set text_replacement_list [lindex $adp_text_result_list 0] - set text_untouched_list [lindex $adp_text_result_list 1] + lassign $adp_text_result_list text_replacement_list text_untouched_list append processing_html_result "Replaced [llength $text_replacement_list] texts:
" foreach text_replacement $text_replacement_list { @@ -108,7 +107,7 @@ append processing_html_result "Did $number_of_replacements replacements, see the log file for details" } -} +} # Remove the processed file from the file list. set files [lrange $files $number_of_processed_files end] Index: openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl,v diff -u -r1.53 -r1.54 --- openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 23 Apr 2018 07:17:58 -0000 1.53 +++ openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 30 Apr 2018 12:45:00 -0000 1.54 @@ -490,8 +490,7 @@ upvar 2 _aa_exports _aa_exports foreach init_class \[list $init_classes\] { if {[llength $init_class] == 2} { - set init_package_key [lindex $init_class 1] - set init_class [lindex $init_class 0] + lassign $init_class init_class init_package_key } else { set init_package_key $package_key } @@ -574,19 +573,15 @@ lappend testcase_ids $testcase_id foreach testcase [nsv_get aa_test cases] { if {$testcase_id == [lindex $testcase 0]} { - set package_key [lindex $testcase 3] - set init_classes [lindex $testcase 5] + lassign $testcase . . . package_key . init_classes foreach init_class $init_classes { set classes([list $package_key $init_class]) 1 } } } } else { foreach testcase [nsv_get aa_test cases] { - set testcase_id [lindex $testcase 0] - set package_key [lindex $testcase 3] - set categories [lindex $testcase 4] - set init_classes [lindex $testcase 5] + lassign $testcase testcase_id . . package_key categories init_classes # try to disqualify the test case @@ -624,8 +619,7 @@ # if {[info exists classes]} { foreach initpair [array names classes] { - set package_key [lindex $initpair 0] - set init_class [lindex $initpair 1] + lassign $initpair package_key init_class set _aa_export {} set aa_init_class_logs([list $package_key $init_class]) {} set aa_in_init_class [list $package_key $init_class] @@ -647,8 +641,7 @@ # if {[info exists classes]} { foreach initpair [array names classes] { - set package_key [lindex $initpair 0] - set init_class [lindex $initpair 1] + lassign $initpair package_key init_class set aa_in_init_class [list $package_key $init_class] _${package_key}__d_$init_class } @@ -688,14 +681,8 @@ set testcase_bodys {} foreach testcase [nsv_get aa_test cases] { if {$testcase_id == [lindex $testcase 0]} { - set testcase_file [lindex $testcase 2] - set package_key [lindex $testcase 3] + lassign $testcase . . testcase_file package_key testcase_cats testcase_inits testcase_on_error testcase_bodys aa_error_level set aa_package_key $package_key - set testcase_cats [lindex $testcase 4] - set testcase_inits [lindex $testcase 5] - set testcase_on_error [lindex $testcase 6] - set testcase_bodys [lindex $testcase 7] - set aa_error_level [lindex $testcase 8] } } if {[llength $testcase_bodys] == 0} { @@ -1090,7 +1077,7 @@ lappend extra_args -headers $requestHeaders } nsv_set aa_test logindata [list peeraddr $peeraddr user_id $user_id] - + # # Construct nice log line # @@ -1102,7 +1089,7 @@ append log_line "\n$body" } aa_log $log_line - + # # Run actual request # Index: openacs-4/packages/acs-automated-testing/tcl/http.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/tcl/Attic/http.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-automated-testing/tcl/http.tcl 23 Mar 2018 23:53:01 -0000 1.4 +++ openacs-4/packages/acs-automated-testing/tcl/http.tcl 30 Apr 2018 12:45:00 -0000 1.5 @@ -5,9 +5,9 @@ # http.tcl -- # # Client-side HTTP for GET, POST, and HEAD commands. -# These routines can be used in untrusted code that uses -# the Safesock security policy. These procedures use a -# callback interface to avoid using vwait, which is not +# These routines can be used in untrusted code that uses +# the Safesock security policy. These procedures use a +# callback interface to avoid using vwait, which is not # defined in the safe base. # # See the file "license.terms" for information on usage and @@ -59,7 +59,7 @@ -proxyport {} -proxyfilter http::ProxyRequired } - + # Use a Mozilla compatible useragent header to avoid problems with # some web sites. set http(-useragent) \ @@ -225,7 +225,7 @@ catch {fileevent $s readable {}} if {$token != {}} { variable $token - upvar 0 $token state + upvar 0 $token state if {[info exists state(socketinfo)]} { if {[info exists socketmap($state(socketinfo))]} { unset socketmap($state(socketinfo)) @@ -401,8 +401,7 @@ unset $token return -code error "Unsupported URL type \"$proto\"" } - set defport [lindex $urlTypes($proto) 0] - set defcmd [lindex $urlTypes($proto) 1] + lassign $urlTypes($proto) defport defcmd if {$port eq ""} { set port $defport @@ -415,8 +414,7 @@ } set state(url) $url if {![catch {$http(-proxyfilter) $host} proxy]} { - set phost [lindex $proxy 0] - set pport [lindex $proxy 1] + lassign $proxy phost pport } # If a timeout is specified we set up the after event @@ -464,7 +462,7 @@ eval $defcmd $async [split $state(socketinfo) :] } s] if {$conStat} { - + # something went wrong while trying to establish the # connection Clean up after events and such, but DON'T # call the command callback (if available) because we're @@ -487,7 +485,7 @@ if {$state(status) eq "error"} { # something went wrong while trying to establish the connection # Clean up after events and such, but DON'T call the command - # callback (if available) because we're going to throw an + # callback (if available) because we're going to throw an # exception from here instead. set err [lindex $state(error) 0] cleanup $token @@ -586,10 +584,10 @@ # get the response from the server because of the error it will # get trying to write the post data. Having both fileevents active # changes the timing and the behavior, but no two platforms - # (among Solaris, Linux, and NT) behave the same, and none + # (among Solaris, Linux, and NT) behave the same, and none # behave all that well in any case. Servers should always read their # POST data if they expect the client to read their response. - + if {$isQuery || $isQueryChannel} { puts $s "Content-Type: $state(-type)" if {!$contDone} { @@ -614,7 +612,7 @@ # Something went wrong, so throw the exception, and the # enclosing catch will do cleanup. return -code error [lindex $state(error) 0] - } + } } } err]} { # The socket probably was never connected, @@ -623,7 +621,7 @@ # Clean up after events and such, but DON'T call the command callback # (if available) because we're going to throw an exception from here # instead. - + # if state(status) is error, it means someone's already called Finish # to do the above-described clean up. if {$state(status) eq "error"} { @@ -737,16 +735,16 @@ variable $token upvar 0 $token state set s $state(sock) - + # Output a block. Tcl will buffer this if the socket blocks - + set done 0 if {[catch { - + # Catch I/O errors on dead sockets if {[info exists state(-query)]} { - + # Chop up large query strings so queryprogress callback # can give smooth feedback @@ -760,7 +758,7 @@ set done 1 } } else { - + # Copy blocks from the query channel set outStr [read $state(-querychannel) $state(-queryblocksize)] @@ -888,7 +886,7 @@ } } lappend state(meta) $key [string trim $value] - + } elseif {[string match "HTTP*" $line]} { set state(http) $line } @@ -1092,8 +1090,8 @@ # http::formatQuery -- # # See documentation for details. -# Call http::formatQuery with an even number of arguments, where -# the first is a name, the second is a value, the third is another +# Call http::formatQuery with an even number of arguments, where +# the first is a name, the second is a value, the third is another # name, and so on. # # Arguments: @@ -1142,7 +1140,7 @@ } # http::ProxyRequired -- -# Default proxy filter. +# Default proxy filter. # # Arguments: # host The destination host Index: openacs-4/packages/acs-automated-testing/tcl/selenium-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/tcl/selenium-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-automated-testing/tcl/selenium-procs.tcl 7 Aug 2017 23:47:46 -0000 1.2 +++ openacs-4/packages/acs-automated-testing/tcl/selenium-procs.tcl 30 Apr 2018 12:45:00 -0000 1.3 @@ -18,19 +18,19 @@ # Note: This code requires a new HTTP/1.1 aware version of geturl - the current # http 2.4 package in Tcl doesn't know how to keep a 1.1 connection alive # and will slow down because *each* Selenium request will time out. -# +# # Example use: # # package require selenium -# +# # Se init localhost 4444 *firefox http://www.google.com/webhp # Se start -# +# # Se open http://www.google.com/webhp # Se type q "hello world" # Se clickAndWait btnG # Se assertTitle "hello world - Google Search" -# +# # Se stop # # by Jean-Claude Wippler, 2007-02-24 @@ -43,26 +43,23 @@ proc Se {cmd args} { global selenium switch -- $cmd { - + init { - set selenium(host) [lindex $args 0] - set selenium(port) [lindex $args 1] - set selenium(browserStartCommand) [lindex $args 2] - set selenium(browserURL) [lindex $args 3] + lassign $args selenium(host) selenium(port) selenium(browserStartCommand) selenium(browserURL) set selenium(sessionId) "" } - + start { set selenium(sessionId) [Se getNewBrowserSession \ $selenium(browserStartCommand) \ $selenium(browserURL)] } - + stop { Se testComplete set selenium(sessionId) "" } - + default { set query [list http::formatQuery cmd $cmd] set i 0 Index: openacs-4/packages/acs-automated-testing/www/admin/component.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/admin/component.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-automated-testing/www/admin/component.tcl 7 Aug 2017 23:47:46 -0000 1.6 +++ openacs-4/packages/acs-automated-testing/www/admin/component.tcl 30 Apr 2018 12:45:00 -0000 1.7 @@ -16,11 +16,9 @@ set component_bodys {} foreach component [nsv_get aa_test components] { - if {$component_id eq [lindex $component 0] && $package_key eq [lindex $component 1]} { - set component_desc [lindex $component 2] - set component_file [lindex $component 3] - set component_body [lindex $component 4] - } + if {$component_id eq [lindex $component 0] && $package_key eq [lindex $component 1]} { + lassign $component . . component_desc component_file component_body + } } ad_return_template Index: openacs-4/packages/acs-templating/tcl/list-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/list-procs.tcl,v diff -u -r1.78 -r1.79 --- openacs-4/packages/acs-templating/tcl/list-procs.tcl 25 Apr 2018 19:23:26 -0000 1.78 +++ openacs-4/packages/acs-templating/tcl/list-procs.tcl 30 Apr 2018 12:45:00 -0000 1.79 @@ -513,12 +513,12 @@ prepare_filters \ -name $name - + # Split the current ordering info into name and direction # name is the string before the comma, order (asc/desc) is what's after if { [info exists list_properties(filter,$list_properties(orderby_name))] } { lassign [lrange [split $list_properties(filter,$list_properties(orderby_name)) ","] 0 1] orderby_name orderby_direction - + set list_properties(orderby_selected_name) $orderby_name if { $orderby_direction eq "" } { @@ -3247,8 +3247,7 @@ # take out filters we already applied... set i 0 foreach option_list $filter_names_options_tmp { - set option_label [lindex $option_list 0] - set option_name [lindex $option_list 1] + lassign $option_list option_label option_name if {"${name}:filter:${option_name}:properties" ni $client_property_filters} { lappend filter_names_options [list $option_label $option_name] } Index: openacs-4/packages/acs-templating/tcl/paginator-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/paginator-procs.tcl,v diff -u -r1.29 -r1.30 --- openacs-4/packages/acs-templating/tcl/paginator-procs.tcl 27 Apr 2018 14:32:11 -0000 1.29 +++ openacs-4/packages/acs-templating/tcl/paginator-procs.tcl 30 Apr 2018 12:45:00 -0000 1.30 @@ -121,14 +121,12 @@ || ([info exists opts(flush_p)] && $opts(flush_p) == "t") } { if { [info exists opts(printing_prefs)] && $opts(printing_prefs) ne "" } { - set title [lindex $opts(printing_prefs) 0] - set stylesheet [lindex $opts(printing_prefs) 1] + lassign $opts(printing_prefs) title stylesheet background header_file footer_file return_url if { $stylesheet ne "" } { set css_link [subst {}] } else { set css_link "" } - set background [lindex $opts(printing_prefs) 2] if { $background ne "" } { set bg "background=\"$background\"" } else { @@ -144,23 +142,20 @@ }] - set header_file [lindex $opts(printing_prefs) 3] if { $header_file ne "" } { ns_write [ns_adp_parse -file $header_file] } ns_write [lindex $opts(printing_prefs) 6] init $statement_name $name $query 1 ns_write [lindex $opts(printing_prefs) 7] - set footer_file [lindex $opts(printing_prefs) 4] if { $footer_file ne "" } { ns_write [ns_adp_parse -file $footer_file] } - set return_url [lindex $opts(printing_prefs) 5] if { $return_url ne "" } { - # Not sure, what the intended semantics of this command was... - #if { [llength $opts(row_ids)]==0 } { - # nsv_set __template_cache_timeout $cache_key $opts(timeout) - #} + # Not sure, what the intended semantics of this command was... + #if { [llength $opts(row_ids)]==0 } { + # nsv_set __template_cache_timeout $cache_key $opts(timeout) + #} ns_write [subst {