Index: openacs-4/packages/news/tcl/news-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs-oracle.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/news/tcl/news-procs-oracle.xql 5 Apr 2005 15:21:25 -0000 1.6 +++ openacs-4/packages/news/tcl/news-procs-oracle.xql 30 Dec 2009 23:13:36 -0000 1.7 @@ -74,15 +74,4 @@ - - - begin - :1 := acs_rel.new(rel_type => 'relationship', - object_id_one => :revision_id, - object_id_two => :image_id, - creation_user => :creation_user, - creation_ip => :peeraddr); - end; - - - \ No newline at end of file + Index: openacs-4/packages/news/tcl/news-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/news/tcl/news-procs-postgresql.xql 5 Apr 2005 15:21:25 -0000 1.5 +++ openacs-4/packages/news/tcl/news-procs-postgresql.xql 30 Dec 2009 23:13:36 -0000 1.6 @@ -67,9 +67,4 @@ - - -select acs_rel__new(null, 'relationship', :revision_id, :image_id, null, :creation_user, :peeraddr) - - Index: openacs-4/packages/news/tcl/news-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/news/tcl/news-procs.tcl 22 Dec 2009 22:24:02 -0000 1.31 +++ openacs-4/packages/news/tcl/news-procs.tcl 30 Dec 2009 23:13:36 -0000 1.32 @@ -82,63 +82,6 @@ } -ad_proc test_file_type { - imgsrc -} { - Used in form validation to check that the uploaded file type really is - what it's meant to be (invokes 'identify' on the file). - - @author Tom Ayles (tom@beatniq.net) -} { - set mime_types [split \ - [parameter::get -parameter ImageUploadTypes] \ - {,}] - if {[catch \ - {array set img_props [ImageMagick::identify $imgsrc]} \ - errmsg]} { - return 0 - } - set mime_type "image/[string tolower $img_props(format)]" - if {[lsearch $mime_types $mime_type] < 0} { - return 0 - } - return 1 -} - -ad_proc news_revision_set_image_id { - revision_id - image_id -} { - Associates an image with a revision of a news item. - - @author simon@simonbuckle.com -} { - set creation_user [ad_conn user_id] - set peeraddr [ad_conn peeraddr] - - db_exec_plsql set_image_rel {} -} - -ad_proc news_revision_get_image_id { - revision_id -} { - Returns the image id if there is one associated with this image, empty string otherwise - - @author simon@simonbuckle.com -} { - return [relation::get_object_two -object_id_one $revision_id -rel_type "relationship"] -} - -ad_proc news_get_image_id { - item_id -} { - Retrieves the image associated with the given news item. - - @author Tom Ayles (tom@beatniq.net) -} { - return [db_string img {} -default {}] -} - ad_proc news__datasource { object_id } { Index: openacs-4/packages/news/tcl/news-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs.xql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/news/tcl/news-procs.xql 8 Aug 2006 21:27:04 -0000 1.11 +++ openacs-4/packages/news/tcl/news-procs.xql 30 Dec 2009 23:13:36 -0000 1.12 @@ -20,12 +20,4 @@ - - - SELECT live_revision AS image_id - FROM cr_items - WHERE content_type = 'image' AND parent_id = :item_id - - - Index: openacs-4/packages/news/www/item-create-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item-create-3.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/news/www/item-create-3.tcl 26 Dec 2009 23:50:53 -0000 1.13 +++ openacs-4/packages/news/www/item-create-3.tcl 30 Dec 2009 23:13:36 -0000 1.14 @@ -16,14 +16,6 @@ {publish_date_ansi:trim "[db_null]"} {archive_date_ansi:trim "[db_null]"} permanent_p:notnull - imgfile:optional -} -validate { - imgfile_valid { - if { [exists_and_not_null imgfile] - && ![ImageMagick::validate_tmp_file $imgfile] } { - ad_complain - } - } } -errors { imgfile_valid {Image file invalid} } -properties { @@ -85,19 +77,8 @@ db_dml content_add {} -blobs [list $publish_body] } -# if an image is specified, we add it here. -if {[exists_and_not_null imgfile]} { - # ImageMagick package will check its tmp directory for the file, so no - # need to expand the path. - db_1row item { - select item_id from cr_revisions where revision_id = :news_id - } - ImageMagick::util::create_image_item -file $imgfile -parent_id $item_id - ImageMagick::delete_tmp_file $imgfile -} +#update RSS if it is enabled - #update RSS if it is enabled - if { !$news_admin_p } { if { ![string equal "open" [ad_parameter ApprovalPolicy "news" "wait"]] } { Index: openacs-4/packages/news/www/item-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item-create.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/news/www/item-create.tcl 26 Dec 2009 23:50:53 -0000 1.10 +++ openacs-4/packages/news/www/item-create.tcl 30 Dec 2009 23:13:36 -0000 1.11 @@ -61,8 +61,6 @@ {label "[_ news.Body]"} {html {cols 60 rows 20}} {value "[list $publish_body ${publish_body.format}]"}} - {text_file:text(file),optional - {label "[_ news.or_upload_text_file]"}} } if { $immediate_approve_p } { Index: openacs-4/packages/news/www/item.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/news/www/item.tcl 22 Dec 2009 22:24:02 -0000 1.17 +++ openacs-4/packages/news/www/item.tcl 30 Dec 2009 23:13:36 -0000 1.18 @@ -19,7 +19,6 @@ publish_date:onevalue publish_body:onevalue publish_format:onevalue - publish_image:onevalue creator_link:onevalue comments:onevalue comment_link:onevalue @@ -68,13 +67,6 @@ set context [list $title] set publish_title {} - set image_id [news_get_image_id $item_id] - set publish_image "" - if { $image_id ne "" } { - set image_url "image/$image_id" - set publish_image $image_url - ns_log Debug "$image_url" - } } else { set title [_ news.Error] set contect [list $title] Index: openacs-4/packages/news/www/news.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/news.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/news/www/news.adp 9 Nov 2008 23:29:28 -0000 1.8 +++ openacs-4/packages/news/www/news.adp 30 Dec 2009 23:13:36 -0000 1.9 @@ -1,6 +1,5 @@ This is the default template to render news items in admin/. Comments are not shown here

@publish_title@

-News image

@publish_lead@

@publish_body;noquote@

#news.Contributed_by# @creator_link;noquote@

Index: openacs-4/packages/news/www/preview.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/preview.adp,v diff -u -r1.14 -r1.15 --- openacs-4/packages/news/www/preview.adp 22 Dec 2009 22:24:02 -0000 1.14 +++ openacs-4/packages/news/www/preview.adp 30 Dec 2009 23:13:36 -0000 1.15 @@ -28,7 +28,6 @@ Index: openacs-4/packages/news/www/preview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/preview.tcl,v diff -u -r1.24 -r1.25 --- openacs-4/packages/news/www/preview.tcl 26 Dec 2009 23:50:53 -0000 1.24 +++ openacs-4/packages/news/www/preview.tcl 30 Dec 2009 23:13:36 -0000 1.25 @@ -96,33 +96,6 @@ } set context [list $title] -# set up image path -if {[exists_and_not_null item_id]} { - set image_id [news_get_image_id $item_id] - if { ![empty_string_p $image_id] } { - set publish_image "image/$image_id" - } else { - set publish_image {} - } - set img_file {} -} elseif {[info exists imgfile]} { - set publish_image "image-view-tmpfile/$imgfile" -} else { - set publish_image {} - set imgfile {} -} - -# if we've come back from the image page, set up dates again -if {[info exists publish_date_ansi] && [info exists archive_date_ansi]} { - set exp {([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})} - if { ![regexp $exp $publish_date_ansi match \ - publish_date(year) publish_date(month) publish_date(day)] - || ![regexp $exp $archive_date_ansi match \ - archive_date(year) archive_date(month) archive_date(day)] } { - ad_return_complaint 1 "[_ news.Publish_archive_dates_incorrect]" - } -} - # deal with Dates, granularity is 'day' # with news_admin privilege fill in publish and archive dates Index: openacs-4/packages/news/www/admin/revision-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/admin/revision-add.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/news/www/admin/revision-add.tcl 26 Dec 2009 23:27:56 -0000 1.9 +++ openacs-4/packages/news/www/admin/revision-add.tcl 30 Dec 2009 23:13:36 -0000 1.10 @@ -41,13 +41,6 @@ set action "[_ news.Revision]" -set image_id [news_get_image_id $item_id] -set image_html "" -if { $image_id ne "" } { - set image_url "../image/$image_id" - set image_html [subst {
}] -} - ad_form -name "news_revision" -export {item_id action} -html {enctype "multipart/form-data"} -action "../preview" -form { {publish_title:text(text) {label "[_ news.Title]"}