Index: openacs-4/packages/xowiki/www/admin/export.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/export.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xowiki/www/admin/export.tcl 7 Aug 2006 20:58:41 -0000 1.2 +++ openacs-4/packages/xowiki/www/admin/export.tcl 17 Aug 2006 01:44:26 -0000 1.3 @@ -1,12 +1,24 @@ -set object_type ::xowiki::Page -set folder_id [$object_type require_folder -name xowiki] +::xowiki::Package initialize -ad_doc { + export the objects of the specified type + @author Gustaf Neumann (gustaf.neumann@wu-wien.ac.at) + @creation-date Aug 11, 2006 + @cvs-id $Id$ + + @param object_type +} -parameter { + {-object_type ::xowiki::Page} +} + +set sql [$object_type instance_select_query \ + -folder_id [::$package_id folder_id] \ + -with_subtypes true] + set content "" -db_foreach instance_select \ - [$object_type instance_select_query -folder_id $folder_id -with_subtypes true] { - ::Generic::CrItem instantiate -item_id $item_id - $item_id volatile - append content [::Serializer deepSerialize $item_id] \n - } +db_foreach instance_select $sql { + ::Generic::CrItem instantiate -item_id $item_id + $item_id volatile + append content [::Serializer deepSerialize $item_id] \n +} ns_return 200 text/plain $content \ No newline at end of file