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.11 -r1.12 --- openacs-4/packages/xowiki/www/admin/export.tcl 12 Jun 2008 11:38:40 -0000 1.11 +++ openacs-4/packages/xowiki/www/admin/export.tcl 9 Jul 2008 10:34:25 -0000 1.12 @@ -31,22 +31,26 @@ ReturnHeaders foreach item_id $item_ids { + # check, if the page was already included + if {[info exists included($item_id)]} {continue} + ::xo::db::CrClass get_instance_from_db -item_id $item_id # # if the page belongs to an Form/PageTemplate, include it as well # if {[$item_id istype ::xowiki::PageInstance]} { set template_id [$item_id page_template] while {1} { - if {[lsearch $item_ids $template_id] == -1 && - ![info exists included($template_id)]} { + if {![info exists included($template_id)]} { set x [::xo::db::CrClass get_instance_from_db -item_id $template_id] $template_id volatile ns_log notice "--exporting needed [$item_id name] ($template_id) //$x [$x info class], m=[$template_id marshall] " #append content [$template_id marshall] \n ns_write "[$template_id marshall] \n" set included($template_id) 1 } + # in case, the template_id has another template, + # iterate... if {[$template_id istype ::xowiki::PageInstance]} { set template_id [$template_id page_template] } else {