Index: openacs-4/packages/xowiki/tcl/import-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/import-procs.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/xowiki/tcl/import-procs.tcl 8 Nov 2011 12:19:01 -0000 1.21 +++ openacs-4/packages/xowiki/tcl/import-procs.tcl 19 Nov 2011 09:04:42 -0000 1.22 @@ -169,15 +169,14 @@ set need_to_import 1 # - # If the page was implicitely added (due to being a + # If the page was implicitly added (due to being a # page_template of an exported page), and a page (e.g. a form - # or a workflow) with the same name is inherited to the + # or a workflow) with the same name can be found in the # target, don't materialize the inherited page. # if {$keep_inherited && [$o exists __export_reason] && [$o set __export_reason] eq "implicit_page_template"} { - #my msg "importing implicit_page_template [$o name]" $o unset __export_reason set page [[my package_id] get_page_from_item_ref \ -allow_cross_package_item_refs false \ @@ -186,8 +185,14 @@ -use_prototype_pages false \ [$o name] \ ] - if {$page ne "" && [$page physical_parent_id] ne [$page parent_id]} { - #my msg "page [$o name] is inherited in folder [my parent_id]" + + # If we would like to restrict to just inherited pages in + # the target, we could extend the test below with a test like + # the following: + # set inherited [expr {[$page physical_parent_id] ne [$page parent_id]}] + + if {$page ne ""} { + #my msg "page [$o name] can ne found in folder [my parent_id]" my incr inherited unset todo($o) set o $page @@ -294,6 +299,7 @@ ::xo::db::CrClass get_instance_from_db -item_id $template_id set new 1 $template_id set __export_reason implicit_page_template + continue } } # @@ -306,7 +312,7 @@ ns_log notice "--export including child $item_id [$item_id name]" set items($item_id) 1 set new 1 - $template_id set __export_reason implicit_child_page + $item_id set __export_reason implicit_child_page } } }