Index: openacs-4/packages/wp-slim/www/style-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/style-view.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/wp-slim/www/style-view.tcl 7 Aug 2014 13:00:22 -0000 1.6 +++ openacs-4/packages/wp-slim/www/style-view.tcl 27 Jun 2015 20:34:43 -0000 1.7 @@ -17,22 +17,22 @@ db_1row style_select { *SQL* } -set url_vars "[export_vars -url {style_id presentation_id}]" +set url_vars "[export_vars {style_id presentation_id}]" -if { $background_color == "" } { +if { $background_color eq "" } { set bgcolor_str "" } else { set bgcolor_str "bgcolor=[ad_color_to_hex $background_color]" } -if { $background_image == "" } { +if { $background_image eq "" } { set bgimage_str "" } else { # this needs to be modified in order to handle the background images!! set bgimage_str "style=\"background-image: url(view-image?revision_id=$background_image)\"" } foreach property { text_color link_color alink_color vlink_color } { - if { [set $property] == "" } { + if { [set $property] eq "" } { set "${property}_font" "" set "${property}_font_end" "" } else { @@ -42,7 +42,7 @@ } # set the return link to the presentation we were editing, if id exists -if { [exists_and_not_null presentation_id] } { +if { ([info exists presentation_id] && $presentation_id ne "") } { set last_link " [list "presentation-top?pres_item_id=$presentation_id" "[db_string pres_name_select "select title from cr_wp_presentations where presentation_id = :presentation_id"]"]" } else { set last_link [list "style-list?user_id=$user_id" "[_ wp-slim.Your_Styles]"] @@ -54,7 +54,7 @@ db_multirow style_images style_image_select { *SQL* } { - set file_size "[format "%.1f" [expr $file_size / 1024.0]]K" + set file_size "[format "%.1f" [expr {$file_size / 1024.0}]]K" } db_release_unused_handles