Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.277 -r1.278 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 28 Jun 2010 11:22:20 -0000 1.277 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 28 Jun 2010 11:49:11 -0000 1.278 @@ -27,7 +27,7 @@ foreach page_name [my form_parameter objects] { # the page_name is the name exactly as stored in the content repository set item_id [::xo::db::CrClass lookup -name $page_name -parent_id [my item_id]] - my msg "want to copy $page_name // $item_id" + #my msg "want to copy $page_name // $item_id" if {$item_id ne 0} {lappend ids $item_id} } ::xowiki::clipboard add $ids 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.16 -r1.17 --- openacs-4/packages/xowiki/www/admin/export.tcl 24 Jun 2010 11:50:19 -0000 1.16 +++ openacs-4/packages/xowiki/www/admin/export.tcl 28 Jun 2010 11:49:11 -0000 1.17 @@ -13,7 +13,6 @@ set folder_id [::$package_id folder_id] -ns_log notice "objects=$objects" # # In a first step, get the items_ids of the objects which are explicitly exported # @@ -26,67 +25,16 @@ set parent_id [$package_id get_parent_and_name -lang $lang \ -path $stripped_name -parent_id $folder_id \ parent local_name] - ns_log notice "lookup of $o in $folder_id returns [::xo::db::CrClass lookup -name $o -parent_id $parent_id]" + #ns_log notice "lookup of $o in $folder_id returns [::xo::db::CrClass lookup -name $o -parent_id $parent_id]" if {[set item_id [::xo::db::CrClass lookup -name $local_name -parent_id $parent_id]] != 0} { set items($item_id) 1 } } } # -# In a second step, include the objects which should be exported implicitly +# The exporter exports the specified objects together with implicitely +# needed objects. # -foreach item_id [array names items] { - # - # load the objects - # - ::xo::db::CrClass get_instance_from_db -item_id $item_id -} +::xowiki::::exporter export [array names items] -while {1} { - set new 0 - ns_log notice "--export works on [array names items]" - foreach item_id [array names items] { - # - # For PageInstances (or its subtypes), include the parent-objects as well - # - if {[$item_id istype ::xowiki::PageInstance]} { - set template_id [$item_id page_template] - if {![info exists items($template_id)]} { - ns_log notice "--export including parent-object $template_id [$template_id name]" - set items($template_id) 1 - ::xo::db::CrClass get_instance_from_db -item_id $template_id - set new 1 - } - } - # - # check for child objects of the item - # - set sql [$object_type instance_select_query -folder_id $item_id -with_subtypes true] - db_foreach instance_select $sql { - if {![info exists items($item_id)]} { - ::xo::db::CrClass get_instance_from_db -item_id $item_id - ns_log notice "--export including child $item_id [$item_id name]" - set items($item_id) 1 - set new 1 - } - } - } - if {!$new} break -} - -set content "" -ns_set put [ns_conn outputheaders] "Content-Type" "text/plain" -ns_set put [ns_conn outputheaders] "Content-Disposition" "attachment;filename=export.xotcl" -ReturnHeaders - -foreach item_id [array names items] { - ns_log notice "--exporting $item_id [$item_id name]" - if {[catch {set obj [$item_id marshall]} errorMsg]} { - ns_log error "Error while exporting $item_id [$item_id name]\n$errorMsg\n$::errorInfo" - } else { - ns_write "$obj\n" - } -} - -#ns_return 200 text/plain $content Index: openacs-4/packages/xowiki/www/resources/xowiki.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/xowiki.css,v diff -u -r1.52 -r1.53 --- openacs-4/packages/xowiki/www/resources/xowiki.css 14 Jun 2010 11:29:44 -0000 1.52 +++ openacs-4/packages/xowiki/www/resources/xowiki.css 28 Jun 2010 11:49:11 -0000 1.53 @@ -5,7 +5,7 @@ /*#at-a-glance td.today {color: #003b53;}*/ /* minimize damage of yui-skin-sam */ -#breadcrumbs {clear: both !important; text-align: left !important;} +#breadcrumbs, #alert-message {clear: both !important; text-align: left !important;} /* useful helper */ .visual-clear {clear: both; display: block;}