Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl,v diff -u -r1.24 -r1.24.6.1 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 9 Nov 2008 23:29:22 -0000 1.24 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 5 Sep 2013 11:38:46 -0000 1.24.6.1 @@ -140,7 +140,7 @@ set day_number 1 } elseif {$julian_date > $last_julian_date} { break - } elseif {$julian_date == [expr $last_julian_date_in_month+1]} { + } elseif {$julian_date == $last_julian_date_in_month + 1} { set day_number 1 } @@ -687,7 +687,7 @@ # show 3 months in a row - if {($i != 0) && ([expr $i % 3] == 0)} { + if {($i != 0) && ($i % 3 == 0)} { append output "" } @@ -698,7 +698,7 @@ \n" } else { set target_date [clock format \ - [clock scan "[expr $i-$curr_month] month" -base $now] -format "%Y-%m-%d"] + [clock scan "[expr {$i-$curr_month}] month" -base $now] -format "%Y-%m-%d"] append output " @@ -722,10 +722,10 @@ set now [clock scan $date] set curr_year $year - set end_year [expr $year + 2] + set end_year [expr {$year + 2}] set monthday [clock format $now -format "%m-%d"] - for {set year [expr $curr_year - 2]} {$year <= $end_year} {incr year} { + for {set year [expr {$curr_year - 2}]} {$year <= $end_year} {incr year} { if {$year == $curr_year} { append output " $year\n" @@ -783,7 +783,7 @@ set day_number 1 } elseif {$julian_date > $last_julian_date} { break - } elseif {$julian_date == [expr $last_julian_date_in_month +1]} { + } elseif {$julian_date == $last_julian_date_in_month + 1} { set day_number 1 } @@ -941,7 +941,7 @@ ns_set put $dt_info_set beginning_of_year \ $year-01-01 ns_set put $dt_info_set days_in_last_month \ - [dt_num_days_in_month $year [expr $month - 1]] + [dt_num_days_in_month $year [expr {$month - 1}]] ns_set put $dt_info_set next_month_name \ [dt_next_month_name $year $month] ns_set put $dt_info_set prev_month_name \ @@ -951,17 +951,17 @@ ad_ns_set_to_tcl_vars $dt_info_set ns_set put $dt_info_set first_julian_date \ - [expr $first_julian_date_of_month + 1 - $first_day_of_month] + [expr {$first_julian_date_of_month + 1 - $first_day_of_month}] ns_set put $dt_info_set first_day \ - [expr $days_in_last_month + 2 - $first_day_of_month] + [expr {$days_in_last_month + 2 - $first_day_of_month}] ns_set put $dt_info_set last_julian_date_in_month \ - [expr $first_julian_date_of_month + $num_days_in_month - 1] + [expr {$first_julian_date_of_month + $num_days_in_month - 1}] set days_in_next_month \ - [expr (7-(($num_days_in_month + $first_day_of_month - 1) % 7)) % 7] + [expr {(7-(($num_days_in_month + $first_day_of_month - 1) % 7)) % 7}] ns_set put $dt_info_set last_julian_date \ - [expr $first_julian_date_of_month + $num_days_in_month - 1 + $days_in_next_month] + [expr {$first_julian_date_of_month + $num_days_in_month - 1 + $days_in_next_month}] # Now, set the variables in the caller's environment Index: openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl,v diff -u -r1.52 -r1.52.2.1 --- openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 8 Dec 2012 18:20:36 -0000 1.52 +++ openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 5 Sep 2013 11:38:46 -0000 1.52.2.1 @@ -382,7 +382,7 @@ foreach name $names { if { [regexp {^([0-9]+)\.start$} $name match request] && $now - [lindex [nsv_get ds_request $name] 0] > $lifetime } { - if {[expr {$request > $max_request}]} { + if {$request > $max_request} { set max_request $request } } 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.32.2.1 -r1.32.2.2 --- openacs-4/packages/acs-templating/tcl/element-procs.tcl 27 Aug 2013 11:33:14 -0000 1.32.2.1 +++ openacs-4/packages/acs-templating/tcl/element-procs.tcl 5 Sep 2013 11:38:46 -0000 1.32.2.2 @@ -262,7 +262,7 @@ } } - if { [string equal $opts(widget) "hidden"] + if { $opts(widget) eq "hidden" && [info exists opts(sign)] && $opts(sign) } { @@ -476,7 +476,7 @@ # a single anonymous validation check was specified set element(validate) [linsert $element(validate) 0 "anonymous"] - } elseif { [expr {$v_length % 3}] } { + } elseif { $v_length % 3 } { error "Invalid number of parameters to validate option: $element(validate) (Length is $v_length)" 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.19 -r1.19.2.1 --- openacs-4/packages/acs-templating/tcl/paginator-procs.tcl 27 Nov 2012 10:28:39 -0000 1.19 +++ openacs-4/packages/acs-templating/tcl/paginator-procs.tcl 5 Sep 2013 11:38:46 -0000 1.19.2.1 @@ -229,7 +229,7 @@ lappend row_ids [lindex $row 0] - if { [expr {$i % $page_size}] == 0 } { + if { $i % $page_size == 0 } { lappend context_ids [lindex $row 1] } incr i