Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.256 -r1.257 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 8 Jul 2008 17:22:16 -0000 1.256 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 9 Jul 2008 10:34:24 -0000 1.257 @@ -337,14 +337,15 @@ # handle form_fields in associated parent my instvar page_template if {[$page_template exists __instance_attribute_map]} { - my msg "we have an instance_attribute_map for [my name] in the page_template [$page_template name]" + #my log "+++ we have an instance_attribute_map for [my name] in the page_template [$page_template name]" if {[$page_template exists __category_map]} { array set cm [$page_template set __category_map] + #my log "+++ we have a category map for [my name] in the page_template [$page_template name]" } array set use [$page_template set __instance_attribute_map] set ia [list] foreach {name value} [my instance_attributes] { - my msg "marshall check $name $value [info exists use($name)] [info exists cm($value)]" + #my msg "marshall check $name $value [info exists use($name)] [info exists cm($value)]" if {[info exists use($name)]} { if {[info exists cm($value)]} { # @@ -357,7 +358,7 @@ # map a party_id # set mapped_value [my map_party $value] - my msg "map party_id for $name to $mapped_value" + #my msg "map party_id for $name to $mapped_value" lappend ia $name $mapped_value } else { lappend ia $name $value @@ -381,8 +382,8 @@ #my log "+++ $party_id" # So far, we just handle users, but we should support parties in # the future as well. - if {$party_id eq ""} { - return "" + if {$party_id eq "" || $party_id == 0} { + return $party_id } acs_user::get -user_id $party_id -array info set result [list] @@ -394,9 +395,9 @@ Page instproc reverse_map_party {-entry -default_party} { # So far, we just handle users, but we should support parties in - # the future as well. + # the future as well.http://localhost:8003/nimawf/admin/export array set "" $entry - #return $default_party + return $default_party if {$(email) ne ""} { set id [party::get_by_email -email $(email)] if {$id ne ""} { return $id } 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 {