Index: openacs-4/packages/static-portlet/tcl/static-portlet-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/tcl/Attic/static-portlet-callback-procs.tcl,v diff -u -N -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/static-portlet/tcl/static-portlet-callback-procs.tcl 5 Sep 2005 14:25:29 -0000 1.1.2.2 +++ openacs-4/packages/static-portlet/tcl/static-portlet-callback-procs.tcl 23 Sep 2005 14:54:01 -0000 1.1.2.3 @@ -25,3 +25,29 @@ db_dml update_portal_element_map {} } + +ad_proc -public -callback datamanager::copy_static -impl datamanager { + -object_id:required + -selected_community:required +} { + Copy an static portlet to another class or community +} { +#set the parameters + set portal_id [dotlrn_community::get_portal_id -community_id $selected_community] + db_1row get_static_portlet_data {} + +#create the object + db_transaction { + + set item_id [static_portal_content::new \ + -package_id $selected_community \ + -content $content \ + -pretty_name $pretty_name + ] + + set old_element_id [static_portal_content::add_to_portal \ + -portal_id $portal_id \ + -package_id $selected_community \ + -content_id $item_id] + } +} Index: openacs-4/packages/static-portlet/tcl/static-portlet-callback-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/tcl/Attic/static-portlet-callback-procs.xql,v diff -u -N -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/static-portlet/tcl/static-portlet-callback-procs.xql 5 Sep 2005 14:25:29 -0000 1.1.2.2 +++ openacs-4/packages/static-portlet/tcl/static-portlet-callback-procs.xql 23 Sep 2005 14:54:01 -0000 1.1.2.3 @@ -18,4 +18,14 @@ + + + SELECT body as content,pretty_name + FROM static_portal_content + WHERE content_id=:object_id + + + + +