Index: openacs-4/packages/news/tcl/news-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-callback-procs.tcl,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/news/tcl/news-callback-procs.tcl 19 Jul 2005 22:01:28 -0000 1.1.2.2 +++ openacs-4/packages/news/tcl/news-callback-procs.tcl 20 Jul 2005 15:47:29 -0000 1.1.2.3 @@ -39,4 +39,15 @@ lappend result "Merge of news is done" return $result -} \ No newline at end of file +} + +ad_proc -public -callback datamanager::move_new -impl datamanager { + -object_id:required + -selected_community:required +} { + Move a new to another class or community +} { +db_dml update_news {} +db_dml update_news_acs_objects_1 {} +db_dml update_news_acs_objects_2 {} +} Index: openacs-4/packages/news/tcl/news-callback-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-callback-procs.xql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/news/tcl/news-callback-procs.xql 19 Jul 2005 22:01:28 -0000 1.1.2.1 +++ openacs-4/packages/news/tcl/news-callback-procs.xql 20 Jul 2005 15:47:29 -0000 1.1.2.2 @@ -18,4 +18,35 @@ + + + update cr_news + set package_id = (select package_id from dotlrn_community_applets where community_id = :selected_community and applet_id = (select applet_id from dotlrn_applets where applet_key = 'dotlrn_news')) + where news_id in (select revision_id from cr_revisions where item_id = (select item_id from cr_items where live_revision=:object_id)); + + + + + + + + update acs_objects + set package_id = (select package_id from dotlrn_community_applets where community_id = :selected_community and applet_id = (select applet_id from dotlrn_applets where applet_key = 'dotlrn_news')), + context_id = (select package_id from dotlrn_community_applets where community_id = :selected_community and applet_id = (select applet_id from dotlrn_applets where applet_key = 'dotlrn_news')) + + where object_id=(select item_id from cr_revisions where revision_id=:object_id); + + + + + + update acs_objects + set package_id = (select package_id + from dotlrn_community_applets + where community_id = :selected_community and applet_id = ( + select applet_id from dotlrn_applets where applet_key = 'dotlrn_news')) + where object_id in (select revision_id from cr_revisions where item_id = (select item_id from cr_revisions where revision_id=:object_id)); + + +