Index: openacs-4/packages/xowiki/tcl/category-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/category-procs.tcl,v diff -u -r1.25 -r1.26 --- openacs-4/packages/xowiki/tcl/category-procs.tcl 13 Sep 2012 16:05:26 -0000 1.25 +++ openacs-4/packages/xowiki/tcl/category-procs.tcl 12 Aug 2013 19:46:49 -0000 1.26 @@ -66,8 +66,8 @@ set have_locale 1 set all_arg [expr {$all ? "-all" : ""}] return [expr {$have_locale ? - [eval category_tree::get_tree $all_arg -subtree_id [list $subtree_id] $tree_id $locale] : - [eval category_tree::get_tree $all_arg -subtree_id [list $subtree_id] $tree_id]}] + [category_tree::get_tree {*}$all_arg -subtree_id $subtree_id $tree_id $locale] : + [category_tree::get_tree {*}$all_arg -subtree_id $subtree_id $tree_id]}] } } Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.238 -r1.239 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 7 Aug 2013 17:23:18 -0000 1.238 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 12 Aug 2013 19:46:49 -0000 1.239 @@ -473,8 +473,8 @@ lappend pairs [list __#$att $att] } } - ::html::input [eval my get_attributes type size maxlength id name value \ - pattern placeholder $pairs] {} + ::html::input [my get_attributes type size maxlength id name value \ + pattern placeholder {*}$pairs] {} foreach att $booleanAtts { if {[my exists __#$att]} {my unset __#$att} } @@ -607,7 +607,7 @@ FormField instproc answer_check=in {} { my instvar value set values [lrange [my correct_when] 1 end] - return [expr {[lsearch -exact $values $value] > -1}] + return [expr {$value in $values}] } FormField instproc answer_check=match {} { return [string match [lindex [my correct_when] 1] [my value]] @@ -1666,7 +1666,7 @@ set package_id [[my object] package_id] #my extraPlugins {timestamp xowikiimage} - if {[lsearch [my extraPlugins] xowikiimage] > -1} { + if {"xowikiimage" in [my extraPlugins]} { my js_image_helper set ready_callback {xowiki_image_callback(e.editor);} } else { @@ -1867,7 +1867,7 @@ # my extraPlugins {timestamp} if {[my set displayMode] eq "inline"} {my lappend extraPlugins sourcedialog} - if {[lsearch [my extraPlugins] xowikiimage] > -1} { + if {"xowikiimage" in [my extraPlugins]} { my js_image_helper set ready_callback {xowiki_image_callback(e.editor);} } else { @@ -1926,7 +1926,7 @@ my render_richtext_as_div } elseif {[my set displayMode] eq "inline"} { if {!$is_repeat_template} { - if {[lsearch [my extraPlugins] xowikiimage] > -1} { + if {"xowikiimage" in [my extraPlugins]} { set ready_callback "xowiki_image_callback(CKEDITOR.instances\['ckinline_$id'\]);" set blur_callback "calc_image_tags_to_wiki_image_links_inline(e);" } @@ -2001,7 +2001,7 @@ ::xo::Page requireJS "/resources/xowiki/wymeditor/jquery.wymeditor.pack.js" set postinit "" foreach plugin {hovertools resizable fullscreen embed} { - if {[lsearch -exact [my plugins] $plugin] > -1} { + if {$plugin in [my plugins]} { switch -- $plugin { embed {} resizable { @@ -2309,7 +2309,7 @@ foreach {label rep} $o break set atts [my get_attributes disabled {CSSclass class}] lappend atts id [my id]:$rep name [my name] type checkbox value $rep - if {[lsearch -exact $value $rep] > -1} {lappend atts checked checked} + if {$rep in $value} {lappend atts checked checked} ::html::input $atts {} html::t "$label " if {![my horizontal]} {html::br} @@ -2346,7 +2346,7 @@ set atts [my get_attributes disabled] lappend atts value $rep #my msg "lsearch {[my value]} $rep ==> [lsearch [my value] $rep]" - if {[lsearch [my value] $rep] > -1} { + if {$rep in [my value]} { lappend atts selected on } ::html::option $atts {::html::t $label} @@ -3089,8 +3089,8 @@ } CompoundField instproc get_named_sub_component_value {{-default ""} args} { - if {[eval my exists_named_sub_component $args]} { - return [[eval my get_named_sub_component $args] value] + if {[my exists_named_sub_component {*}$args]} { + return [[my get_named_sub_component {*}$args] value] } else { return $default } @@ -3240,7 +3240,7 @@ -locale [my locale] -object [my object] \ -value $element] $c set_disabled [my exists disabled] - if {[lsearch [my components] $c] == -1} {my lappend components $c} + if {$c ni [my components]} {my lappend components $c} continue } foreach {class code trim_zeros} [my set format_map($element)] break @@ -3255,7 +3255,7 @@ $c set_disabled [my exists disabled] $c set code $code $c set trim_zeros $trim_zeros - if {[lsearch [my components] $c] == -1} {my lappend components $c} + if {$c ni [my components]} {my lappend components $c} } } Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.190 -r1.191 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 29 Jul 2013 08:58:11 -0000 1.190 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 12 Aug 2013 19:46:49 -0000 1.191 @@ -408,7 +408,7 @@ my cache_includelet_data $key-data } else { #my msg "eval $data" - eval $data + {*}$data } return $HTML } -instproc cache_includelet_data {key} { @@ -3852,7 +3852,7 @@ } elseif {[info command ::xo::Table::YUIDataTableRenderer] ne ""} { lappend cmd -renderer YUIDataTableRenderer } - eval $cmd + {*}$cmd # # Sorting is done for the time being in Tcl. This has the advantage Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -r1.277 -r1.278 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 12 Aug 2013 18:22:30 -0000 1.277 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 12 Aug 2013 19:46:49 -0000 1.278 @@ -520,7 +520,7 @@ if {$package_class ne ""} { # we found an xo::Package, but is it an xowiki package? set classes [concat $package_class [$package_class info heritage]] - if {[lsearch $classes ::xowiki::Package] > -1} { + if {"::xowiki::Package" in $classes} { # yes, it is an xowiki::package, compute the name and return the package_id ::xowiki::Package require $package_id set name [string range $path [string length $(url)] end] @@ -1803,7 +1803,7 @@ # element in $to. # foreach e $to { - if {[lsearch -exact $from $e] == -1} { + if {$e ni $from} { set inserted $e break } @@ -2178,7 +2178,7 @@ # In case of PageTemplate and subtypes, we need to check # for pages using this template set classes [concat $object_type [$object_type info heritage]] - if {[lsearch $classes "::xowiki::PageTemplate"] > -1} { + if {"::xowiki::PageTemplate" in $classes} { set count [::xowiki::PageTemplate count_usages -item_id $item_id -publish_status all] if {$count > 0} { return [$id error_msg \ Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.131 -r1.132 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 11 Apr 2013 12:56:24 -0000 1.131 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 12 Aug 2013 19:46:50 -0000 1.132 @@ -781,7 +781,7 @@ # set page_instance_form_atts [list] foreach {var _} [$data template_vars [$template set text]] { - if {[lsearch $dont_edit $var] == -1} {lappend page_instance_form_atts $var} + if {$var ni $dont_edit} {lappend page_instance_form_atts $var} } my set field_list [concat [my field_list_top] $page_instance_form_atts [my field_list_bottom]] Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.471 -r1.472 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 20 Jul 2013 15:48:35 -0000 1.471 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 12 Aug 2013 19:46:50 -0000 1.472 @@ -825,11 +825,11 @@ Page proc import {-user_id -package_id -folder_id {-replace 0} -objects} { my log "DEPRECATED" if {![info exists package_id]} {set package_id [::xo::cc package_id]} - set cmd [list $package_id import -replace $replace] + set cmd [list $package_id import -replace $replace] if {[info exists user_id]} {lappend cmd -user_id $user_id} if {[info exists objects]} {lappend cmd -objects $objects} - eval $cmd + {*}$cmd } # @@ -1332,7 +1332,7 @@ } } if {[info exists configure]} { - eval $page configure $configure + $page configure {*}$configure } return [my render_includelet $page] } @@ -1540,13 +1540,13 @@ -name "" \ -type localimage [list -label $label] \ -href $link - eval [self]::link configure $options + [self]::link configure {*}$options return [self]::link } } } set l [ExternalLink new [list -label $label] -href $link] - eval $l configure $options + $l configure {*}$options return $l } @@ -1595,7 +1595,7 @@ [list -stripped_name $(stripped_name)] [list -label $label] \ -parent_id $(parent_id) -item_id $(item_id) -package_id $package_id - if {[catch {eval [self]::link configure $options} errorMsg]} { + if {[catch {[self]::link configure {*}$options} errorMsg]} { ns_log error "$errorMsg\n$::errorInfo" return "
$errorMsg