Index: openacs-4/packages/xotcl-core/xotcl-core.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/xotcl-core.info,v diff -u -r1.106.2.12 -r1.106.2.13 --- openacs-4/packages/xotcl-core/xotcl-core.info 14 Feb 2020 13:42:12 -0000 1.106.2.12 +++ openacs-4/packages/xotcl-core/xotcl-core.info 20 Feb 2020 10:15:21 -0000 1.106.2.13 @@ -10,7 +10,7 @@ t xotcl - + Gustaf Neumann XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes) 2017-08-06 @@ -43,7 +43,7 @@ BSD-Style 2 - + Index: openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl,v diff -u -r1.41.2.13 -r1.41.2.14 --- openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 18 Feb 2020 12:17:54 -0000 1.41.2.13 +++ openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 20 Feb 2020 10:15:21 -0000 1.41.2.14 @@ -18,6 +18,7 @@ {default_package_parameter_page_info ""} {site_wide_package_parameters ""} {site_wide_package_parameter_page_info ""} + {site_wide_pages ""} } PackageMgr ad_instproc first_instance {-privilege -party_id} { @@ -210,9 +211,17 @@ PackageMgr instproc require_site_wide_pages { {-refetch:boolean false} + {-pages} } { + # + # If no pages are provided, take the default of the definition of + # the package class. + # + if {$pages eq ""} { + set pages ${:site_wide_pages} + } set info [:require_site_wide_info] - foreach n {folder.form link.form page.form import-archive.form photo.form} { + foreach n $pages { set item_id [::xo::db::CrClass lookup -name en:$n -parent_id [dict get $info folder_id]] #:log "lookup en:$n => $item_id" if {!$item_id || $refetch} { Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -r1.180.2.32 -r1.180.2.33 --- openacs-4/packages/xowiki/xowiki.info 14 Feb 2020 13:42:12 -0000 1.180.2.32 +++ openacs-4/packages/xowiki/xowiki.info 20 Feb 2020 10:15:21 -0000 1.180.2.33 @@ -10,7 +10,7 @@ t xowiki - + Gustaf Neumann A xotcl-based enterprise wiki system with multiple object types 2017-08-06 @@ -55,8 +55,8 @@ BSD-Style 2 - - + + Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -r1.332.2.46 -r1.332.2.47 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 20 Feb 2020 09:34:27 -0000 1.332.2.46 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 20 Feb 2020 10:15:22 -0000 1.332.2.47 @@ -27,6 +27,14 @@ with_user_tracking 0 } + Package site_wide_pages { + folder.form + link.form + page.form + import-archive.form + photo.form + } + Package ad_proc get_package_id_from_page_id { {-revision_id 0} {-item_id 0} @@ -1305,6 +1313,9 @@ :log "try to import a prototype page for '$(stripped_name)' [array get {}]" if {$(stripped_name) ne ""} { + # + # Allow import of prototype pages into the actual folder. + # if {[info exists (logical_parent_id)]} { set parent_id $(logical_parent_id) } elseif {[info exists (parent_id)]} {