Index: openacs-4/packages/news/www/preview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/preview.tcl,v diff -u -r1.26 -r1.27 --- openacs-4/packages/news/www/preview.tcl 30 Dec 2009 23:22:31 -0000 1.26 +++ openacs-4/packages/news/www/preview.tcl 30 Dec 2009 23:24:44 -0000 1.27 @@ -14,8 +14,6 @@ {publish_body:allhtml,trim ""} publish_body.format:notnull {revision_log: ""} - text_file:optional - text_file.tmpfile:optional,tmpfile {publish_date:array ""} {archive_date:array ""} {permanent_p: "f"} @@ -38,28 +36,6 @@ } } - 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 } { - ad_complain "[_ news.lt_Publish_body_is_missi]" - return - } elseif { ![empty_string_p $publish_body] && $file_size > 0 } { - ad_complain "[_ news.You_can_either_upload_a_news_item_or_enter_text_in_the_box_provided_but_not_both]" - return - } - } - - 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 "[_ news.lt_Your_document_is_larg] ([util_commify_number $b_max] [_ news.bytes])" - return - } - } - } -properties { title:onevalue @@ -138,15 +114,6 @@ } -# if uploaded file, read it into publish_body and massage it -if {[info exists file_size]} { - if { $file_size > 0 } { - set fd [open ${text_file.tmpfile}] - set publish_body [read $fd] - close $fd - } -} - if { ${publish_body.format} eq "text/html" || ${publish_body.format} eq "text/enhanced" } { # close any open HTML tags in any case