Index: openacs-4/packages/news/www/admin/revision-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/admin/revision-add-3.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/news/www/admin/revision-add-3.tcl 12 Feb 2019 17:12:19 -0000 1.17 +++ openacs-4/packages/news/www/admin/revision-add-3.tcl 12 Feb 2019 17:28:59 -0000 1.18 @@ -2,14 +2,14 @@ ad_page_contract { - This page adds a new revision to a news item + This page adds a new revision to a news item and redirects to the item page of that item @author stefan@arsdigita.com @creation-date 2000-12-20 @cvs-id $Id$ -} { +} { item_id:naturalnum,notnull publish_title:notnull publish_lead @@ -26,35 +26,35 @@ if {$permanent_p == "t"} { set archive_date_ansi "" -} +} # approval foo set approval_user [ad_conn "user_id"] set approval_ip [ad_conn "peeraddr"] set approval_date [dt_sysdate] set live_revision_p "t" -# creation foo +# creation foo set creation_ip [ad_conn "peeraddr"] set creation_user [ad_conn "user_id"] # make new revision the active revision set active_revision_p "t" # Insert is 2-step process, same as in item-create-3.tcl -if {[catch { +if {[catch { set revision_id [db_exec_plsql create_news_item_revision {}] set content_add [db_map content_add] - if {![string match $content_add ""]} { - db_dml content_add { + if {![string match $content_add ""]} { + db_dml content_add { update cr_revisions set content = empty_blob() where revision_id = :revision_id returning content into :1 } -blobs [list $publish_body] } - + } errmsg ]} { set complaint " [_ news.lt_The_database_did_not_] \