Index: openacs-4/packages/evaluation/www/answer-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/answer-add-edit.tcl,v diff -u -N -r1.18 -r1.18.8.1 --- openacs-4/packages/evaluation/www/answer-add-edit.tcl 8 Aug 2006 21:26:41 -0000 1.18 +++ openacs-4/packages/evaluation/www/answer-add-edit.tcl 19 Aug 2014 07:35:54 -0000 1.18.8.1 @@ -16,7 +16,7 @@ return_url:notnull } -validate { late_submit -requires { task_id:integer } { - if { [string eq [db_string late_turn_in { *SQL* }] "f"] && [db_string compare_dates { *SQL* } -default 0] } { + if { [string equal [db_string late_turn_in { *SQL* }] "f"] && [db_string compare_dates { *SQL* } -default 0] } { ad_complain "[_ evaluation.lt_This_task_can_not_be_]" } } @@ -67,11 +67,11 @@ } -validate { {url - { ([string eq $url "http://"] && ![empty_string_p $upload_file]) || (![string eq $url "http://"] && [empty_string_p $upload_file]) || (![string eq $url "http://"] && [util_url_valid_p $url]) } + { ($url eq "http://" && $upload_file ne "") || ($url ne "http://" && $upload_file eq "") || ($url ne "http://" && [util_url_valid_p $url]) } { [_ evaluation.lt_Upload_a_file_OR_a_va] } } {upload_file - { ([string eq $url "http://"] && ![empty_string_p $upload_file]) || (![string eq $url "http://"] && [empty_string_p $upload_file]) } + { ($url eq "http://" && $upload_file ne "") || ($url ne "http://" && $upload_file eq "") } { [_ evaluation.lt_Upload_a_file_OR_a_ur] } } } -on_submit { @@ -82,7 +82,7 @@ set title "" # set storage_type to its default value according to a db constraint set storage_type "lob" - if { ![empty_string_p $upload_file] } { + if { $upload_file ne "" } { # Get the filename part of the upload file if { ![regexp {[^//\\]+$} $upload_file filename] } { @@ -96,7 +96,7 @@ if { ![parameter::get -parameter "StoreFilesInDatabaseP" -package_id [ad_conn package_id]] } { set storage_type file } - } elseif { ![string eq $url "http://"] } { + } elseif { $url ne "http://" } { set mime_type "text/plain" set title "link" } @@ -119,7 +119,7 @@ content::item::set_live_revision -revision_id $revision_id - if { ![empty_string_p $upload_file] } { + if { $upload_file ne "" } { set tmp_file [template::util::file::get_property tmp_filename $upload_file] set content_length [file size $tmp_file] @@ -141,7 +141,7 @@ } - } elseif { ![string eq $url "http://"] } { + } elseif { $url ne "http://" } { db_dml link_content { *SQL* } set content_length 0