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.56 -r1.57
--- openacs-4/packages/xotcl-core/xotcl-core.info 17 Sep 2008 10:14:20 -0000 1.56
+++ openacs-4/packages/xotcl-core/xotcl-core.info 27 Sep 2008 17:18:39 -0000 1.57
@@ -8,10 +8,10 @@
t
xotcl
-
+
Gustaf Neumann
XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes)
- 2008-09-17
+ 2008-09-27
Gustaf Neumann, WU Wien
This component contains some core functionality for OpenACS
applications using XOTcl. It includes
@@ -41,7 +41,7 @@
BSD-Style
0
-
+
Index: openacs-4/packages/xotcl-core/tcl/context-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/context-procs.tcl,v
diff -u -r1.40 -r1.41
--- openacs-4/packages/xotcl-core/tcl/context-procs.tcl 24 Sep 2008 12:58:44 -0000 1.40
+++ openacs-4/packages/xotcl-core/tcl/context-procs.tcl 27 Sep 2008 17:18:39 -0000 1.41
@@ -298,9 +298,21 @@
ConnectionContext instproc cache {cmd} {
set key cache($cmd)
- if {![my exists $key]} {my set $key [uplevel $cmd]}
+ if {![my exists $key]} {my set $key [my uplevel $cmd]}
return [my set $key]
}
+ ConnectionContext instproc cache_exists {cmd} {
+ return [my exists cache($cmd)]
+ }
+ ConnectionContext instproc cache_get {cmd} {
+ return [my set cache($cmd)]
+ }
+ ConnectionContext instproc cache_set {cmd value} {
+ return [my set cache($cmd) $value]
+ }
+ ConnectionContext instproc cache_unset {cmd} {
+ return [my unset cache($cmd)]
+ }
ConnectionContext instproc role=all {-user_id:required -package_id} {
return 1
@@ -426,6 +438,8 @@
}
ConnectionContext instproc set_parameter {name value} {
+ set key [list get_parameter $name]
+ if {[my cache_exists $key]} {my cache_delete $key}
my set perconnectionparam($name) $value
}
ConnectionContext instproc get_parameter {name {default ""}} {
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.22 -r1.23
--- openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 17 Sep 2008 10:14:20 -0000 1.22
+++ openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 27 Sep 2008 17:18:39 -0000 1.23
@@ -580,6 +580,7 @@
{-where_clause ""}
{-from_clause ""}
{-with_subtypes:boolean true}
+ {-with_children:boolean false}
{-publish_status}
{-count:boolean false}
{-folder_id}
@@ -593,6 +594,7 @@
@param orderby for ordering the solution set
@param where_clause clause for restricting the answer set
@param with_subtypes return subtypes as well
+ @param with_children return immediate child objects of all objects as well
@param count return the query for counting the solutions
@param folder_id parent_id
@param publish_status one of 'live', 'ready', or 'production'
@@ -632,7 +634,11 @@
set acs_objects_table ""
}
lappend cond "coalesce(ci.live_revision,ci.latest_revision) = bt.revision_id"
- lappend cond "ci.parent_id = $folder_id"
+ if {$with_children} {
+ lappend cond "(ci.parent_id = $folder_id or ci.parent_id in (select item_id from cr_items where parent_id = $folder_id))"
+ } else {
+ lappend cond "ci.parent_id = $folder_id"
+ }
if {$page_number ne ""} {
set limit $page_size
Index: openacs-4/packages/xotcl-core/tcl/generic-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/generic-procs.tcl,v
diff -u -r1.92 -r1.93
--- openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 17 Sep 2008 10:14:20 -0000 1.92
+++ openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 27 Sep 2008 17:18:39 -0000 1.93
@@ -47,8 +47,8 @@
my forward var uplevel #$level set
my instvar data folder_id
+ set folder_id [[$data package_id] folder_id]
set class [$data info class]
- set folder_id [$data set parent_id]
if {![my exists add_page_title]} {
my set add_page_title [_ xotcl-core.create_new_type \