Index: openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl 15 Sep 2007 07:22:40 -0000 1.18 +++ openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl 2 Oct 2007 19:04:57 -0000 1.19 @@ -23,7 +23,7 @@ @param string If specified, will return the resulting page to the caller string instead sending it to the connection. } { - if {![empty_string_p $template]} { + if {$template ne ""} { template::set_file \ [template::util::url_to_file $template [ad_conn file]] } @@ -101,7 +101,7 @@ set parsed_template [template::adp_parse [file root [ad_conn file]] {}] - if {![empty_string_p $parsed_template]} { + if {$parsed_template ne ""} { # # acs-lang translator mode @@ -124,18 +124,18 @@ if { [string first "... while { [regexp -indices {\x002\(\x001([^\x001]*)\x001\)\x002} $parsed_template indices key] } { - set before [string range $parsed_template 0 [expr [lindex $indices 0] - 1]] - set after [string range $parsed_template [expr [lindex $indices 1] + 1] end] + set before [string range $parsed_template 0 [expr {[lindex $indices 0] - 1}]] + set after [string range $parsed_template [expr {[lindex $indices 1] + 1}] end] set key [string range $parsed_template [lindex $key 0] [lindex $key 1]] Index: openacs-4/packages/acs-templating/tcl/element-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/element-procs.tcl,v diff -u -r1.28 -r1.29 --- openacs-4/packages/acs-templating/tcl/element-procs.tcl 25 Sep 2007 15:22:38 -0000 1.28 +++ openacs-4/packages/acs-templating/tcl/element-procs.tcl 2 Oct 2007 19:08:19 -0000 1.29 @@ -172,7 +172,7 @@ # set the form section set opts(section) $form_properties(section) - if { ![string equal $opts(section) ""] } { + if { $opts(section) ne "" } { set opts(sec_fieldset) $form_properties(sec_fieldset) set opts(sec_legend) $form_properties(sec_legend) set opts(sec_legendtext) $form_properties(sec_legendtext) @@ -197,8 +197,8 @@ } # If the widget is a checkbox or radio widget, set attributes - if { [string equal $opts(widget) radio] || \ - [string equal $opts(widget) checkbox] } { + if { $opts(widget) eq "radio" || \ + [string equal $opts(widget) "checkbox"] } { # If there's no legend text, no point to generate the fieldset if { ![info exists opts(legendtext)] } { @@ -218,7 +218,7 @@ append fs_options " class=\"form-fieldset\"" } foreach name [array names fs_attributes] { - if { [string equal $fs_attributes($name) {}] } { + if {$fs_attributes($name) eq {}} { append fs_options " $name" } else { append fs_options " $name=\"$fs_attributes($name)\"" @@ -233,7 +233,7 @@ array set lg_attributes $opts(legend) set lg_options "" foreach name [array names lg_attributes] { - if { [string equal $lg_attributes($name) {}] } { + if {$lg_attributes($name) eq {}} { append lg_options " $name" } else { append lg_options " $name=\"$lg_attributes($name)\"" Index: openacs-4/packages/acs-templating/tcl/form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/form-procs.tcl,v diff -u -r1.37 -r1.38 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 25 Sep 2007 15:22:39 -0000 1.37 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 2 Oct 2007 19:08:19 -0000 1.38 @@ -412,7 +412,7 @@ get_reference # legend can't be empty - if { ![string equal $section ""] && [string equal $legendtext ""] } { + if { $section ne "" && $legendtext eq "" } { ns_log Warning "template::form::section (form: $id, section: $section): The section legend is empty. You must provide text for the legend otherwise the section fieldset won't be created." return } @@ -427,7 +427,7 @@ append properties(sec_fieldset) " class=\"form-fieldset\"" } foreach name [array names fs_attributes] { - if { [string equal $fs_attributes($name) {}] } { + if {$fs_attributes($name) eq {}} { append properties(sec_fieldset) " $name" } else { append properties(sec_fieldset) " $name=\"$fs_attributes($name)\"" @@ -436,10 +436,10 @@ # legend attributes set properties(sec_legend) "" - if { ![string eq $legendtext ""] } { + if { $legendtext ne "" } { array set lg_attributes $legend foreach name [array names lg_attributes] { - if { [string equal $lg_attributes($name) {}] } { + if {$lg_attributes($name) eq {}} { append properties(sec_legend) " $name" } else { append properties(sec_legend) " $name=\"$lg_attributes($name)\"" @@ -588,7 +588,7 @@ append output " class=\"form-fieldset\"" } foreach name [array names fs_attributes] { - if { [string equal $fs_attributes($name) {}] } { + if {$fs_attributes($name) eq {}} { append output " $name" } else { append output " $name=\"$fs_attributes($name)\"" Index: openacs-4/packages/acs-templating/tcl/widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/widget-procs.tcl,v diff -u -r1.48 -r1.49 --- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 18 Sep 2007 03:49:05 -0000 1.48 +++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 2 Oct 2007 19:03:37 -0000 1.49 @@ -378,7 +378,7 @@ if { ( $type eq "checkbox" || $type eq "radio" ) && [info exists element(value)] } { # This can be used in the form template in a tag. set attributes(id) "$element(form_id):elements:$element(name):$element(value)" - } elseif { [string equal $type "password"] || [string equal $type "text"] || [string equal $type "button"] || [string equal $type "file"]} { + } elseif { $type eq "password" || $type eq "text" || $type eq "button" || $type eq "file"} { set attributes(id) "$element(name)" } @@ -905,7 +905,7 @@ foreach answer_desc $option { set answer_description [lindex $answer_desc 0] set no_of_answers [lindex $answer_desc 1] - append output "