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.16 -r1.106.2.17
--- openacs-4/packages/xotcl-core/xotcl-core.info 21 Mar 2020 06:18:35 -0000 1.106.2.16
+++ openacs-4/packages/xotcl-core/xotcl-core.info 12 May 2020 08:28:00 -0000 1.106.2.17
@@ -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/cr-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/cr-procs.tcl,v
diff -u -r1.76.2.30 -r1.76.2.31
--- openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 2 Apr 2020 18:19:29 -0000 1.76.2.30
+++ openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 12 May 2020 08:28:00 -0000 1.76.2.31
@@ -1223,6 +1223,19 @@
:update_item_index
}
+ CrItem ad_instproc is_package_root_folder {} {
+ # In general, every cr_item may be in the role of a
+ # "root-folder" of a package.
+ } {
+ # e.g. the -100 folder has no package_id
+ # if {$package_id eq ""} {return false}
+ if {![info exists :item_id]} {
+ return false
+ }
+ #::xo::Package require ${:package_id}
+ return [expr {${:item_id} eq [::${:package_id} folder_id]} ? true : false]
+ }
+
CrItem instproc is_cached_object {} {
return [info exists :__cached_object]
}
@@ -1634,10 +1647,6 @@
::xo::dc 1row _ "select acs_object__update_last_modified(:folder_id, :user_id, :ip)"
}
- ::xo::db::CrFolder instproc is_package_root_folder {} {
- return [expr {${:folder_id} eq [::${:package_id} folder_id]} ? true : false]
- }
-
::xo::db::CrFolder ad_instproc delete {} {
Delete the CrFolder instance. This method takes the folder_id of
the current instance.
Index: openacs-4/packages/xowiki/xowiki.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v
diff -u -r1.180.2.38 -r1.180.2.39
--- openacs-4/packages/xowiki/xowiki.info 3 May 2020 17:12:21 -0000 1.180.2.38
+++ openacs-4/packages/xowiki/xowiki.info 12 May 2020 08:28:00 -0000 1.180.2.39
@@ -10,7 +10,7 @@
t
xowiki
-
+
Gustaf Neumann
A xotcl-based enterprise wiki system with multiple object types
2017-08-06
@@ -55,7 +55,7 @@
BSD-Style
2
-
+
Index: openacs-4/packages/xowiki/tcl/folder-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/folder-procs.tcl,v
diff -u -r1.55.2.33 -r1.55.2.34
--- openacs-4/packages/xowiki/tcl/folder-procs.tcl 5 Mar 2020 11:31:44 -0000 1.55.2.33
+++ openacs-4/packages/xowiki/tcl/folder-procs.tcl 12 May 2020 08:28:00 -0000 1.55.2.34
@@ -264,26 +264,27 @@
#:msg "FOLDERS [$page name] package_id $package_id current_folder ${:current_folder} [${:current_folder} name]"
# Start with the "package's folder" as root folder
- set root_folder_id [::$package_id folder_id]
- set root_folder [::xo::db::CrClass get_instance_from_db -item_id $root_folder_id]
- set root_folder_is_current [expr {${:current_folder_id} == [$root_folder item_id]}]
-
+ set root_folder [::xo::db::CrClass get_instance_from_db \
+ -item_id [::$package_id folder_id]]
+
set mb [info commands ::__xowiki__MenuBar]
if {$mb ne ""} {
#
- # We have a menubar. Add folder-specific content to the
- # menubar.
+ # We have a menubar. Add folder-specific content to the menubar.
#
- if {$root_folder_is_current} {
+ if {[${:current_folder_id} is_package_root_folder]} {
#
- # We do not want to see unneeded parent_ids in the links. When
- # we insert to the root folder, set opt_parent_id to empty to
- # make argument passing easy. "make_link" just checks for the
- # existence of the variable, so we unset parent_id in this case.
+ # We do not want to see parent_ids in the links of the root
+ # folder. When we insert to the root folder, set opt_parent_id
+ # to empty to make argument passing easy. "make_link" just
+ # checks for the existence of the variable, so we unset
+ # parent_id in this case.
#
set opt_parent_id ""
set folder_link [::$package_id package_url]
- if {[info exists parent_id]} {unset parent_id}
+ if {[info exists parent_id]} {
+ unset parent_id
+ }
} else {
set parent_id ${:current_folder_id}
set opt_parent_id $parent_id