Index: openacs-4/packages/acs-automated-testing/tcl/http.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/tcl/http.tcl,v diff -u -N -r1.2.2.3 -r1.2.2.4 --- openacs-4/packages/acs-automated-testing/tcl/http.tcl 10 Sep 2015 08:21:14 -0000 1.2.2.3 +++ openacs-4/packages/acs-automated-testing/tcl/http.tcl 20 Oct 2015 08:01:06 -0000 1.2.2.4 @@ -361,9 +361,10 @@ foreach {flag value} $args { if {[regexp $pat $flag]} { # Validate numbers - if {[info exists state($flag)] && \ - [string is integer -strict $state($flag)] && \ - ![string is integer -strict $value]} { + if {[info exists state($flag)] + && [string is integer -strict $state($flag)] + && ![string is integer -strict $value] + } { unset $token return -code error "Bad value for $flag ($value), must be integer" } @@ -842,17 +843,20 @@ # We have to use binary translation to count bytes properly. fconfigure $s -translation binary - if {$state(-binary) || ![string match -nocase text* $state(type)] - || [string match "*gzip*" $state(coding)] - || [string match "*compress*" $state(coding)]} { + if {$state(-binary) + || ![string match -nocase text* $state(type)] + || [string match "*gzip*" $state(coding)] + || [string match "*compress*" $state(coding)] + } { # Turn off conversions for non-text data set state(binary) 1 if {[info exists state(-channel)]} { fconfigure $state(-channel) -translation binary } } - if {[info exists state(-channel)] && \ - ![info exists state(-handler)]} { + if {[info exists state(-channel)] + && ![info exists state(-handler)] + } { # Initiate a sequence of background fcopies fileevent $s readable {} CopyStart $s $token @@ -1149,8 +1153,9 @@ proc http::ProxyRequired {host} { variable http if {[info exists http(-proxyhost)] && [string length $http(-proxyhost)]} { - if {![info exists http(-proxyport)] || \ - $http(-proxyport) eq ""} { + if {![info exists http(-proxyport)] + || $http(-proxyport) eq "" + } { set http(-proxyport) 8080 } return [list $http(-proxyhost) $http(-proxyport)] Index: openacs-4/packages/acs-automated-testing/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/admin/index.tcl,v diff -u -N -r1.9.2.1 -r1.9.2.2 --- openacs-4/packages/acs-automated-testing/www/admin/index.tcl 10 Sep 2015 08:21:14 -0000 1.9.2.1 +++ openacs-4/packages/acs-automated-testing/www/admin/index.tcl 20 Oct 2015 08:01:06 -0000 1.9.2.2 @@ -114,8 +114,9 @@ # - The package key is blank or it matches the specified. # - The category is blank or it matches the specified. # - if {($by_package_key eq "" || ($by_package_key eq $package_key)) && \ - ($by_category eq "" || ([lsearch $categories $by_category] != -1))} { + if {($by_package_key eq "" || ($by_package_key eq $package_key)) + && ($by_category eq "" || ($by_category in $categories)) + } { # Swap the highlight flag between packages. if {$old_package_key ne $package_key} { set marker 1 Index: openacs-4/packages/acs-subsite/lib/user-info.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/user-info.tcl,v diff -u -N -r1.22.2.1 -r1.22.2.2 --- openacs-4/packages/acs-subsite/lib/user-info.tcl 10 Sep 2015 08:21:34 -0000 1.22.2.1 +++ openacs-4/packages/acs-subsite/lib/user-info.tcl 20 Oct 2015 08:01:05 -0000 1.22.2.2 @@ -68,8 +68,10 @@ lappend read_only_elements authority_id } -if { $user(authority_id) != [auth::authority::local] || ![auth::UseEmailForLoginP] || \ - ([acs_user::site_wide_admin_p] && [llength [auth::authority::get_authority_options]] > 1) } { +if { $user(authority_id) != [auth::authority::local] + || ![auth::UseEmailForLoginP] + || ([acs_user::site_wide_admin_p] && [llength [auth::authority::get_authority_options]] > 1) + } { lappend elms_list { username:text(text) {label "[_ acs-subsite.Username]"} Index: openacs-4/packages/acs-subsite/tcl/group-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/group-procs.tcl,v diff -u -N -r1.39.2.3 -r1.39.2.4 --- openacs-4/packages/acs-subsite/tcl/group-procs.tcl 10 Sep 2015 08:21:36 -0000 1.39.2.3 +++ openacs-4/packages/acs-subsite/tcl/group-procs.tcl 20 Oct 2015 08:01:05 -0000 1.39.2.4 @@ -663,9 +663,12 @@ set admin_p [permission::permission_p -object_id $group_id -privilege "admin"] # Only admins can add non-membership_rel members - if { $rel_type eq "" || \ - (!$no_perm_check_p && $rel_type ne "" && $rel_type ne "membership_rel" && \ - ![permission::permission_p -object_id $group_id -privilege "admin"]) } { + if { $rel_type eq "" + || (!$no_perm_check_p + && $rel_type ne "" + && $rel_type ne "membership_rel" + && ![permission::permission_p -object_id $group_id -privilege "admin"]) + } { set rel_type "membership_rel" } 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 -N -r1.44.2.8 -r1.44.2.9 --- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 6 Oct 2015 11:49:11 -0000 1.44.2.8 +++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 20 Oct 2015 08:01:05 -0000 1.44.2.9 @@ -552,8 +552,11 @@ upvar $array info # the folder index page is called . - if { $info(url) eq "" || $info(url) eq "index" || \ - [string match "*/" $info(url)] || [string match "*/index" $info(url)] } { + if { $info(url) eq "" + || $info(url) eq "index" + || [string match "*/" $info(url)] + || [string match "*/index" $info(url)] + } { set info(url) "[string range $info(url) 0 [string last / $info(url)]]." } @@ -566,8 +569,11 @@ # Need to prepend the path from the subsite to this package set current_url [string range [ad_conn url] [string length $base_url] end] } - if { $current_url eq "" || $current_url eq "index" || \ - [string match "*/" $current_url] || [string match "*/index" $current_url] } { + if { $current_url eq "" + || $current_url eq "index" + || [string match "*/" $current_url] + || [string match "*/index" $current_url] + } { set current_url "[string range $current_url 0 [string last / $current_url]]." } @@ -970,9 +976,9 @@ if { !$admin_p } { # If not admin, user must be member of group, and members must be allowed to invite other members - if { ![parameter::get -parameter "MembersCanInviteMembersP" -default 0] || \ - ![group::member_p -group_id $group_id] } { - + if { ![parameter::get -parameter "MembersCanInviteMembersP" -default 0] + || ![group::member_p -group_id $group_id] + } { ad_return_forbidden "Cannot invite members" "I'm sorry, but you're not allowed to invite members to this group" ad_script_abort } Index: openacs-4/packages/acs-subsite/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/index.tcl,v diff -u -N -r1.21.12.1 -r1.21.12.2 --- openacs-4/packages/acs-subsite/www/index.tcl 10 Sep 2015 08:21:37 -0000 1.21.12.1 +++ openacs-4/packages/acs-subsite/www/index.tcl 20 Oct 2015 08:01:05 -0000 1.21.12.2 @@ -53,8 +53,9 @@ set show_members_list_to [parameter::get -parameter "ShowMembersListTo" -default 2] set show_members_page_link_p \ - [expr {$admin_p || ($user_id != 0 && $show_members_list_to ==1) || \ - $show_members_list_to == 0 }] + [expr {$admin_p + || ($user_id != 0 && $show_members_list_to ==1) + || $show_members_list_to == 0 }] # User's group membership Index: openacs-4/packages/acs-subsite/www/admin/site-map/allow-for-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/allow-for-view.tcl,v diff -u -N -r1.4.12.1 -r1.4.12.2 --- openacs-4/packages/acs-subsite/www/admin/site-map/allow-for-view.tcl 10 Sep 2015 08:21:47 -0000 1.4.12.1 +++ openacs-4/packages/acs-subsite/www/admin/site-map/allow-for-view.tcl 20 Oct 2015 08:01:05 -0000 1.4.12.2 @@ -1,5 +1,5 @@ ad_page_contract { - Ask for confirmation for view on public site_map + Ask for confirmation for view on public site_map @author Viaro Networks (vivian@viaro.net) @cvs-id $id: @@ -24,10 +24,10 @@ foreach check_node $checkbox { if {$main_node eq $check_node} { - + # The main site node is always checked lappend check_list $check_node - + } elseif {[site_node::get_parent_id -node_id $check_node] eq $main_node} { # This node doesn't have a parent node, only the main site node @@ -37,19 +37,21 @@ # The node has an inmediate parent, we put it on the list and all his parents until the # node_id equals the main_site node_id and is already in the list lappend check_list $check_node - while { [site_node::get_parent_id -node_id $check_node] != $main_node && \ - [lsearch -exact $check_list [site_node::get_parent_id -node_id $check_node]] == -1 } { - set check_node [site_node::get_parent_id -node_id $check_node] - lappend check_list $check_node - } + while { + [site_node::get_parent_id -node_id $check_node] != $main_node + && [site_node::get_parent_id -node_id $check_node] ni $check_list + } { + set check_node [site_node::get_parent_id -node_id $check_node] + lappend check_list $check_node + } } } db_transaction { - db_dml delete_nodes { *SQL* } + db_dml delete_nodes {} foreach checkbox $check_list { - db_dml insert_nodes { *SQL* } + db_dml insert_nodes {} } } Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl,v diff -u -N -r1.88.2.3 -r1.88.2.4 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 18 Sep 2015 07:33:48 -0000 1.88.2.3 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 20 Oct 2015 08:01:04 -0000 1.88.2.4 @@ -2604,8 +2604,9 @@ foreach line [split $error "\n"] { if { [string first NOTICE $line] == -1 } { append error_lines "$line\n" - set error_found [expr { $error_found || [string first ERROR $line] != -1 || \ - [string first FATAL $line] != -1 } ] + set error_found [expr { $error_found + || [string first ERROR $line] != -1 + || [string first FATAL $line] != -1 } ] } } @@ -2737,8 +2738,9 @@ foreach line [split $error "\n"] { if { [string first NOTICE $line] == -1 } { append error_lines "$line\n" - set error_found [expr { $error_found || [string first ERROR $line] != -1 || \ - [string first FATAL $line] != -1 } ] + set error_found [expr { $error_found + || [string first ERROR $line] != -1 + || [string first FATAL $line] != -1 } ] } } Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl,v diff -u -N -r1.36.2.2 -r1.36.2.3 --- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 18 Sep 2015 07:33:48 -0000 1.36.2.2 +++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 20 Oct 2015 08:01:04 -0000 1.36.2.3 @@ -367,8 +367,7 @@ # Check the db type set file_db_type [apm_guess_db_type $package_key $package_rel_path] - set right_db_type_p [expr {$file_db_type eq ""} || \ - [string equal $file_db_type [db_type]]] + set right_db_type_p [expr {$file_db_type eq "" || $file_db_type eq [db_type]}] # Check the file type set file_type [apm_guess_file_type $package_key $package_rel_path] Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl,v diff -u -N -r1.109.2.7 -r1.109.2.8 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 13 Oct 2015 09:57:27 -0000 1.109.2.7 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 20 Oct 2015 08:01:04 -0000 1.109.2.8 @@ -537,8 +537,9 @@ lassign $prov prov_uri prov_version # If what we provide is not already provided, or the alredady provided version is # less than what we provide, record this new provision - if { ![info exists provided($prov_uri)] || \ - [apm_version_names_compare $provided($prov_uri) $prov_version] == -1 } { + if { ![info exists provided($prov_uri)] + || [apm_version_names_compare $provided($prov_uri) $prov_version] == -1 + } { set provided($prov_uri) $prov_version } # If what we provide is required, and the required version is less than what we provide, Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v diff -u -N -r1.95.2.3 -r1.95.2.4 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 26 Sep 2015 11:25:22 -0000 1.95.2.3 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 20 Oct 2015 08:01:04 -0000 1.95.2.4 @@ -1874,8 +1874,9 @@ and d.version_id = v.version_id and v.enabled_p = 't' } { - if { ![info exists installed_provides($service_uri)] || \ - [apm_version_names_compare $installed_provides($service_uri) $service_version] == -1 } { + if { ![info exists installed_provides($service_uri)] + || [apm_version_names_compare $installed_provides($service_uri) $service_version] == -1 + } { set installed_provides($service_uri) $service_version } } Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -N -r1.78.2.4 -r1.78.2.5 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 19 Oct 2015 09:03:48 -0000 1.78.2.4 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 20 Oct 2015 08:01:05 -0000 1.78.2.5 @@ -550,12 +550,13 @@ Returns 1 if the page is used for logging in, 0 otherwise. } { - set url [ad_conn url] - if { [string match "*register/*" $url] || [string match "/index*" $url] || \ - [string match "/index*" $url] || \ - "/" eq $url || \ - [string match "*password-update*" $url] } { + if { [string match "*register/*" $url] + || [string match "/index*" $url] + || [string match "/index*" $url] + || "/" eq $url + || [string match "*password-update*" $url] + } { return 1 } Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl,v diff -u -N -r1.93.2.8 -r1.93.2.9 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 11 Oct 2015 17:22:23 -0000 1.93.2.8 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 20 Oct 2015 08:01:05 -0000 1.93.2.9 @@ -882,10 +882,11 @@ array set node_array [site_node::get -url $url] # are we looking for a specific package_key? - if { $package_key eq "" || \ - [lsearch -exact $package_key $node_array(package_key)] != -1 } { + if { $package_key eq "" + || $node_array(package_key) in $package_key + } { set elm_value $node_array($element) - } + } } return $elm_value @@ -943,7 +944,7 @@ } if { $folder ne "" } { - if { [lsearch $existing_urls $folder] != -1 } { + if { $folder in $existing_urls } { # The folder is on the list if { $current_node_id eq "" } { # New node: Complain @@ -952,8 +953,9 @@ # Renaming an existing node: Check to see if the node is merely conflicting with itself set parent_url [site_node::get_url -node_id $parent_node_id] set new_node_url "$parent_url$folder" - if { ![site_node::exists_p -url $new_node_url] || \ - $current_node_id != [site_node::get_node_id -url $new_node_url] } { + if { ![site_node::exists_p -url $new_node_url] + || $current_node_id != [site_node::get_node_id -url $new_node_url] + } { return {} } } 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 -N -r1.60.2.7 -r1.60.2.8 --- openacs-4/packages/acs-templating/tcl/list-procs.tcl 18 Sep 2015 07:31:48 -0000 1.60.2.7 +++ openacs-4/packages/acs-templating/tcl/list-procs.tcl 20 Oct 2015 08:01:05 -0000 1.60.2.8 @@ -1711,10 +1711,10 @@ # Handle 'other_label' - if { ([info exists current_filter_value] && $current_filter_value ne "") && \ - !$found_selected_p && \ - $filter_properties(other_label) ne "" } { - + if { [info exists current_filter_value] && $current_filter_value ne "" + && !$found_selected_p + && $filter_properties(other_label) ne "" + } { # Add filter entry with the 'other_label'. lappend filter_properties(values) [list $filter_properties(other_label) {}] lappend filter_properties(urls) {}