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.35 -r1.36 --- openacs-4/packages/news/tcl/news-procs.tcl 27 Oct 2014 16:41:47 -0000 1.35 +++ openacs-4/packages/news/tcl/news-procs.tcl 7 Aug 2017 23:48:12 -0000 1.36 @@ -17,13 +17,7 @@ } { foreach id $id_list { - db_exec_plsql news_item_archive { - begin - news.archive( - item_id => :id, - archive_date => :when); - end; - } + db_exec_plsql news_item_archive {} } } @@ -37,11 +31,7 @@ } { foreach id $id_list { - db_exec_plsql news_item_make_permanent { - begin - news.make_permanent(:id); - end; - } + db_exec_plsql news_item_make_permanent {} } } @@ -54,11 +44,7 @@ } { foreach id $id_list { - db_exec_plsql news_item_delete { - begin - news.del(:id); - end; - } + db_exec_plsql news_item_delete {} } } @@ -72,12 +58,7 @@ set url_stub "" - db_0or1row get_url_stub " - select site_node__url(node_id) as url_stub - from site_nodes - where object_id=:package_id - " - + db_0or1row get_url_stub {} return $url_stub } @@ -116,7 +97,7 @@ [list \ item_id $object_id \ publish_title $publish_title \ - publish_title $publish_lead \ + publish_lead $publish_lead \ publish_body $publish_body \ publish_format $publish_format \ publish_image {} \ @@ -238,7 +219,7 @@ @error } { - return [db_string get_last_updated ""] + return [db_string get_last_updated {}] } ad_proc -private news__rss_datasource { @@ -338,8 +319,10 @@ set instance_name [application_group::closest_ancestor_element -include_self -node_id $node_id -element "instance_name"] # get the title and teaser for latest news item for the given package id - if { [db_0or1row "get_news" "select item_id, publish_date, publish_title as title, publish_lead as lead, publish_body, publish_format from news_items_live_or_submitted where news_id = - :news_id"] } { + if { [db_0or1row get_news { + select item_id, publish_date, publish_title as title, publish_lead as lead, publish_body, publish_format + from news_items_live_or_submitted where news_id = :news_id + }] } { set new_content "$title\n\n$lead\n\n[ad_html_text_convert -from $publish_format -to text/plain -- $publish_body]" set html_content [ad_html_text_convert -from $publish_format -to text/html -- $publish_body] append new_content "\n\n[string repeat - 70]" @@ -358,3 +341,9 @@ -notif_date $publish_date } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: