Index: openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl,v diff -u -N -r1.17 -r1.18 --- openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl 21 Mar 2018 08:53:23 -0000 1.17 +++ openacs-4/packages/acs-content-repository/tcl/content-folder-procs.tcl 9 Apr 2018 21:16:06 -0000 1.18 @@ -156,54 +156,53 @@ -folder_id:required -attributes:required } { - Update standard cr_folder attributes, including the attributes for + update standard cr_folder attributes, including the attributes for the folder cr_item - - @author Dave Bauer (dave@thedesignexperience.org) + + @author dave bauer (dave@thedesignexperience.org) @creation-date 2004-06-04 - + @param folder_id folder to update - @param attributes A list of pairs of additional attributes and - their values to set. Each pair is a list of lists of two elements: + @param attributes a list of pairs of additional attributes and + their values to set. each pair is a list of lists of two elements: key => value - Valid attributes are: label, description, name, package_id + valid attributes are: label, description, name, package_id - @return - - @error + @return + + @error } { set valid_attributes [list label description package_id] - set update_text "" + set update_text "" foreach {attribute_list} $attributes { - set attribute [lindex $attribute_list 0] - set value [lindex $attribute_list 1] - if {[lsearch $valid_attributes $attribute] > -1} { + set attribute [lindex $attribute_list 0] + set value [lindex $attribute_list 1] + if {$attribute in $valid_attributes} { - # create local variable to use for binding + # create local variable to use for binding + set $attribute $value - set $attribute $value - if {$update_text ne ""} { - append update_text "," - } - append update_text " ${attribute} = :${attribute} " - } + if {$update_text ne ""} { + append update_text "," + } + append update_text " ${attribute} = :${attribute} " + } } if {$update_text ne ""} { - # we have valid attributes, update them - - set query_text "update cr_folders set ${update_text} where folder_id=:folder_id" - db_dml item_update $query_text + # we have valid attributes, update them + set query_text "update cr_folders set ${update_text} where folder_id=:folder_id" + db_dml item_update $query_text } # pass the rest of the attributes to content::item::update # we can just send the folder attributes because they don't overlap content::item::update \ - -item_id $folder_id \ - -attributes $attributes + -item_id $folder_id \ + -attributes $attributes } @@ -319,28 +318,28 @@ ad_proc content::folder::get_folder_from_package { -package_id:required } { - @author Timo Hentschel (timo@timohentschel.de) + @author timo hentschel (timo@timohentschel.de) @creation-date 2005-01-06 - Returns the folder_id of the package instance. Cached + returns the folder_id of the package instance. cached } { return [util_memoize [list content::folder::get_folder_from_package_not_cached -package_id $package_id]] } ad_proc -private content::folder::get_folder_from_package_not_cached { -package_id:required } { - @author Timo Hentschel (timo@timohentschel.de) + @author timo hentschel (timo@timohentschel.de) @creation-date 2005-01-06 - Returns the folder_id of the package instance + returns the folder_id of the package instance } { return [db_string get_folder_id { select folder_id from cr_folders where package_id = :package_id }] } -# Local variables: +# local variables: # mode: tcl # tcl-indent-level: 4 # indent-tabs-mode: nil Index: openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl 9 Apr 2018 20:11:54 -0000 1.14 +++ openacs-4/packages/acs-content-repository/tcl/publish-procs.tcl 9 Apr 2018 21:16:06 -0000 1.15 @@ -835,14 +835,14 @@ ad_proc -private publish::set_to_pairs { params {exclusion_list ""} } { @private set_to_pairs - + Convert an ns_set into a list of name-value pairs, in form {name value name value ...} - + @param params The ns_set id @param exclusion_list {} A list of keys to be ignored - + @return A list of name-value pairs representing the data in the ns_set } { @@ -851,7 +851,7 @@ for { set i 0 } { $i < [ns_set size $params] } { incr i } { set key [ns_set key $params $i] set value [ns_set value $params $i] - if { [lsearch $exclusion_list $key] == -1 } { + if { $key ni $exclusion_list } { lappend extra_args $key $value } } 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.103 -r1.104 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 7 Apr 2018 08:48:01 -0000 1.103 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 9 Apr 2018 21:16:06 -0000 1.104 @@ -980,6 +980,7 @@ foreach path [glob -nocomplain -types f "[acs_package_root_dir $parent_node(package_key)]/www/*.tcl"] { set name [file rootname [lindex [file split $path] end]] if { [lsearch $existing_urls $name] == -1 } { + if { $name ni $existing_urls } { lappend existing_urls $name } } 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.75 -r1.76 --- openacs-4/packages/acs-templating/tcl/list-procs.tcl 7 Apr 2018 19:37:20 -0000 1.75 +++ openacs-4/packages/acs-templating/tcl/list-procs.tcl 9 Apr 2018 21:16:06 -0000 1.76 @@ -393,7 +393,7 @@ # Handle filters foreach { dim_name dim_spec } $filters { - if { [lsearch $reserved_filter_names $dim_name] != -1 } { + if { $dim_name in $reserved_filter_names } { error "The name '$dim_name' is a reserved filter name, list '$name'. Reserved names are [join $reserved_filter_names ", "]." } template::list::filter::create \ @@ -1538,11 +1538,11 @@ if {!$element_properties(hide_p)} { if {$element_properties(from_clause_eval) ne ""} { set evaluated_from_clause [uplevel $list_properties(ulevel) $element_properties($property)] - if {[lsearch $list_properties(from_clauses) $evaluated_from_clause] < 0} { + if {$evaluated_from_clause ni $list_properties(from_clauses)} { lappend list_properties(from_clauses) $evaluated_from_clause } } elseif {$element_properties(from_clause) ne "" - && [lsearch $list_properties(from_clauses) $element_properties(from_clause)] < 0} { + && $element_properties(from_clause) ni $list_properties(from_clauses)} { lappend list_properties(from_clauses) $element_properties(from_clause) } # get the select clause @@ -3212,7 +3212,7 @@ # loop through all the filters in this list foreach filter_ref $list_properties(filter_refs) { upvar #$level $filter_ref filter_properties - if {$filter_properties(label) ne "" && [lsearch $filter_exclude_from_key $filter_properties(name)] < 0} { + if {$filter_properties(label) ne "" && $filter_properties(name) ni $filter_exclude_from_key} { # filters with a label will be added to the form for the user # to choose from lappend filter_names_options_tmp [list $filter_properties(label) $filter_properties(name)] @@ -3346,7 +3346,7 @@ upvar \#[template::adp_level] $f_ref filter_properties if {$filter_properties(label) ne "" && $filter_properties(hide_p) eq 0 - && [lsearch $filter_exclude_from_key $filter_properties(name)] < 0} { + && $filter_properties(name) ni $filter_exclude_from_key} { incr visible_filters_p } if {![template::element::exists $filters_form_name $filter_properties(name)]} {