Index: openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl 5 May 2007 13:07:35 -0000 1.9 +++ openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl 22 Mar 2008 18:16:32 -0000 1.9.2.1 @@ -132,12 +132,12 @@ set image_name "email${user_id}.gif" set email_length [string length $email] set dest_path "/tmp/$image_name" - set width [expr [expr $email_length * [expr $font_size / 2]] + 2] + set width [expr [expr {$email_length * [expr {$font_size / 2}]}] + 2] set height $font_size - set ypos [expr [expr $height / 2] + 3 ] + set ypos [expr {[expr {$height / 2}] + 3 }] set size "${width}x$height" - if { [string equal $bgcolor ""]} { + if {$bgcolor eq ""} { set bgcolor "\#ffffff" } @@ -154,7 +154,7 @@ return "" } - if { [string equal $transparent ""] || [string equal $transparent "1"] } { + if { $transparent eq "" || $transparent eq "1" } { # Making the bg color transparent if {[catch {exec convert $dest_path -transparent $bgcolor $dest_path} errmsg]} { return "" @@ -216,12 +216,12 @@ set image_name "email${user_id}.gif" set email_length [string length $new_email] set dest_path "/tmp/$image_name" - set width [expr [expr $email_length * [expr $font_size / 2]] + 2] + set width [expr [expr {$email_length * [expr {$font_size / 2}]}] + 2] set height $font_size - set ypos [expr [expr $height / 2] + 3 ] + set ypos [expr {[expr {$height / 2}] + 3 }] set size "${width}x$height" - if { [string equal $bgcolor ""]} { + if {$bgcolor eq ""} { set bgcolor "\#ffffff" } @@ -237,7 +237,7 @@ exec convert -font $font_type -fill blue -pointsize $font_size -draw "text 0,$ypos $new_email" \ $dest_path $dest_path - if { [string equal $transparent ""] || [string equal $transparent "1"] } { + if { $transparent eq "" || $transparent eq "1" } { # Making the bg color transparent exec convert $dest_path -transparent $bgcolor $dest_path }