Index: openacs-4/packages/news/www/preview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/preview.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/news/www/preview.tcl 12 Jan 2002 13:16:02 -0000 1.2 +++ openacs-4/packages/news/www/preview.tcl 13 Mar 2002 22:50:53 -0000 1.3 @@ -14,8 +14,8 @@ {publish_body:allhtml,trim ""} {revision_log: ""} html_p:notnull,trim - {text_file:trim ""} - {text_file.tmpfile:tmpfile ""} + text_file:optional + text_file.tmpfile:optional,tmpfile {publish_date:array ""} {archive_date:array ""} {permanent_p: "f"} @@ -44,7 +44,7 @@ } } - check_upload_one -requires {publish_body text_file} { + check_upload_one -requires {publish_body text_file.tmpfile text_file} { set file_size [file size ${text_file.tmpfile}] # !XOR condition (don't want to have both) if { [empty_string_p $publish_body] && $file_size==0 } { @@ -56,12 +56,12 @@ } } - max_size -requires {text_file} { + max_size -requires {text_file.tmpfile text_file} { set b [file size ${text_file.tmpfile}] set b_max [expr 1000*[ad_parameter MaxFileSizeKb "news" 1024]] if { $b > $b_max } { - ad_complain "Your Word document is larger than the maximum size allowed ([util_commify_number $b_max] bytes)" + ad_complain "Your document is larger than the maximum size allowed ([util_commify_number $b_max] bytes)" return } }