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.17 -r1.18
--- openacs-4/packages/xotcl-core/xotcl-core.info 5 Aug 2006 20:38:24 -0000 1.17
+++ openacs-4/packages/xotcl-core/xotcl-core.info 8 Aug 2006 23:39:50 -0000 1.18
@@ -8,10 +8,10 @@
t
xotcl
-
+
Gustaf Neumann
XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes)
- 2006-08-05
+ 2006-08-09
This component contains some core functionality for OACS
applications using XOTcl. It includes
XOTcl thread handling for OACS (supporting persistent and
@@ -23,9 +23,10 @@
well an XOTcl Object and Class browser, as well as
means to control the recreation of objects and classes
when components are reloaded. 0.23 contains a major overhaul of the Generic classes. Object preliminary object layer for content repository, oo templating. 0.36 brings caching support for cr-items. 0.38: important change: uses cr_items.name instead of cr_revision.title to label content items. This effects as well the api (lookup uses -name instead of -title). 0.40: updating package_id in acs_objects, requires now openacs 5.2.*; 0.41: supporting storage_type file, on_submit method and html for forms
+ BSD-Style
0
-
+
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.22 -r1.23
--- openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 5 Aug 2006 20:39:28 -0000 1.22
+++ openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 8 Aug 2006 23:39:51 -0000 1.23
@@ -64,7 +64,7 @@
}
CrClass set common_query_atts {
- item_id creation_user creation_date last_modified object_type
+ item_id revision_id creation_user creation_date last_modified object_type
creation_user last_modified
}
#if {[apm_version_names_compare [ad_acs_version] 5.2] > -1} {
@@ -310,18 +310,27 @@
set atts [list data]
foreach v $raw_atts {
catch {$object instvar $v}
- lappend atts [expr {$v eq "name" ? "i" : "n"}].$v
+ switch -- $v {
+ name {set fq i.$v}
+ creation_date {set fq o.$v}
+ default {set fq n.$v}
+ }
+ lappend atts $fq
}
if {$revision_id} {
db_1row note_select "\
- select [join $atts ,], i.parent_id from [my set table_name]i n, cr_items i \
- where n.revision_id = :revision_id and i.item_id = n.item_id"
- $object set revision_id $revision_id
+ select [join $atts ,], i.parent_id \
+ from [my set table_name]i n, cr_items i,acs_objects o \
+ where n.revision_id = :revision_id \
+ and i.item_id = n.item_id \
+ and o.object_id = i.item_id"
} else {
db_1row note_select "\
- select [join $atts ,], i.parent_id from cr_items i, [my set table_name]i n \
+ select [join $atts ,], i.parent_id \
+ from [my set table_name]i n, cr_items i, acs_objects o \
where i.item_id = :item_id \
- and n.[my id_column] = i.live_revision"
+ and n.[my id_column] = i.live_revision \
+ and o.object_id = i.item_id"
}
$object set text $data
$object set item_id $item_id
@@ -606,7 +615,7 @@
my update_content_length $storage_type $revision_id
db_0or1row make_live {select content_item__set_live_revision(:revision_id)}
}
- my set last_modified [db_string get_last_modified {select last_modified from acs_objects where object_id = :item_id}]
+ my set last_modified [db_string get_last_modified {select last_modified from acs_objects where object_id = :revision_id}]
return $item_id
}