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.20 -r1.20.2.1 --- openacs-4/packages/news/tcl/news-procs.tcl 5 Apr 2005 15:21:25 -0000 1.20 +++ openacs-4/packages/news/tcl/news-procs.tcl 15 Jun 2005 17:47:58 -0000 1.20.2.1 @@ -372,3 +372,39 @@ rss_gen_report $subscr_id } +namespace eval news::merge { + + ad_proc -callback MergeShowUserInfo -impl news { + -user_id:required + } { + Show the news items + } { + set msg "News items of $user_id" + ns_log Notice $msg + set result [list $msg] + + set news [db_list_of_lists getaprovednews { *SQL* }] + + lappend result $news + + return $result + } + + ad_proc -callback MergePackageUser -impl news { + -from_user_id:required + -to_user_id:required + } { + Merge the news of two users. + } { + set msg "Merging news" + ns_log Notice $msg + set result [list $msg] + + db_dml update_from_news_approval { *SQL* } + + lappend result "Merge of news is done" + + return $result + } + +} 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.8 -r1.8.2.1 --- openacs-4/packages/news/tcl/news-procs.xql 26 Mar 2005 21:45:09 -0000 1.8 +++ openacs-4/packages/news/tcl/news-procs.xql 15 Jun 2005 17:47:58 -0000 1.8.2.1 @@ -26,4 +26,20 @@ WHERE content_type = 'image' AND parent_id = :item_id + + + update cr_news + set approval_user = :to_user_id + where approval_user = :from_user_id + + + + + + select news_id, lead + from cr_news + where approval_user = :user_id + + +