+
+
+
+ |
+@formerror.upload_file@
+ |
+ |
+
" + set added 0 + foreach o [$object_type allinstances] { + $o set parent_id $folder_id + # page instances have references to page templates, add these first + if {[$o istype ::xowiki::PageInstance]} continue + set item [CrItem lookup -title [$o set title] -parent_id $folder_id] + if {$item != 0 && $replace} { ;# we delete the original + ::Generic::CrItem delete -item_id $item + set item 0 + } + if {$item == 0} { + $o save_new + incr added + } + } + + foreach o [$object_type allinstances] { + if {[$o istype ::xowiki::PageInstance]} { + db_transaction { + set item [CrItem lookup -title [$o set title] -parent_id $folder_id] + if {$item != 0 && $replace} { ;# we delete the original + ::Generic::CrItem delete -item_id $item + set item 0 + } + if {$item == 0} { ;# the item does not exist -> update reference and save + set old_template_id [$o set page_template] + set template [CrItem lookup \ + -title [$old_template_id set title] \ + -parent_id $folder_id] + $o set page_template $template + $o save_new + incr added + } + } + } + $o destroy + } + append msg "$added objects inserted
" + } + } + + +set page_title "Import XoWiki Pages" +set context {} +ad_return_template Index: openacs-4/packages/xowiki/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/index.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xowiki/www/admin/index.tcl 30 Dec 2005 00:09:58 -0000 1.3 +++ openacs-4/packages/xowiki/www/admin/index.tcl 19 Jan 2006 23:01:58 -0000 1.4 @@ -16,6 +16,10 @@ template::list::create \ -name admin_index \ + -actions { + export export export + import import import + } \ -elements { delete { link_url_col delete_url