Index: openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl,v diff -u -r1.58.2.1 -r1.58.2.2 --- openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 26 Mar 2008 13:44:45 -0000 1.58.2.1 +++ openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 10 Apr 2008 08:16:25 -0000 1.58.2.2 @@ -382,7 +382,7 @@ } { Return the object type for the give id. - @retun object_type, typically an XOTcl class + @return object_type, typically an XOTcl class } { db_1row [my qn get_class] \ "select object_type from acs_objects where object_id=$id" @@ -695,7 +695,7 @@ # for now, we simply return a constant "unknown", otherwise the # argument would be required return [db_list_of_lists [my qn get_function_params] { - select args.argument_name, 'unknown' + select args.argument_name, 'NULL' from user_arguments args where args.position > 0 and args.object_name = upper(:object_name) @@ -1635,7 +1635,9 @@ } { upvar $tz_var tz set tz 00 - regexp {^([^.]+)[.]?[0-9]*([+-][0-9]*)$} $timestamp _ timestamp tz + if {![regexp {^([^.]+)[.][0-9]*([+-][0-9]*)$} $timestamp _ timestamp tz]} { + regexp {^([^.]+)([+-][0-9]*)$} $timestamp _ timestamp tz + } return $timestamp } } Index: openacs-4/packages/xotcl-core/tcl/cluster-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/cluster-procs.tcl,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/xotcl-core/tcl/cluster-procs.tcl 24 Sep 2007 12:04:26 -0000 1.2 +++ openacs-4/packages/xotcl-core/tcl/cluster-procs.tcl 10 Apr 2008 08:16:25 -0000 1.2.2.1 @@ -15,11 +15,22 @@ eval ::xo::Cluster broadcast $args } + proc cache_flush_all {cache pattern} { + # Provide means to perform a wildcard-based cache flushing on + # (cluster) machines. + foreach n [ns_cache names $cache $pattern] {ns_cache flush $cache $n} + } + Class Cluster -parameter {host {port 80}} Cluster set allowed_host_patterns [list] Cluster array set allowed_host { "127.0.0.1" 1 } + # + # The allowed commands are of the form + # - command names followed by + # - optional "except patterns" + # Cluster array set allowed_command { set "" unset "" @@ -28,6 +39,7 @@ nsv_incr "" bgdelivery "" ns_cache "^ns_cache\s+eval" + xo::cache_flush_all "" } # # Prevent unwanted object generations for unknown 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.16 -r1.16.2.1 --- openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 14 Mar 2008 19:34:00 -0000 1.16 +++ openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 10 Apr 2008 08:16:25 -0000 1.16.2.1 @@ -63,7 +63,7 @@ } { Return the object type for an item_id or revision_id. - @retun object_type typically an XOTcl class + @return object_type typically an XOTcl class } { set object_type [ns_cache eval xotcl_object_type_cache \ [expr {$item_id ? $item_id : $revision_id}] { @@ -183,7 +183,7 @@ CrClass set common_query_atts { object_type - creation_user creation_date creation_user + creation_user creation_date publish_status last_modified } if {[apm_version_names_compare [ad_acs_version] 5.2] > -1} { @@ -462,6 +462,7 @@ switch -glob -- $v { publish_status {set fq i.$v} creation_date {set fq o.$v} + creation_user {set fq o.$v} package_id {set fq o.$v} default {set fq n.$v} } @@ -492,6 +493,11 @@ and i.item_id = n.item_id \ and o.object_id = $revision_id" } else { + # We fetch the creation_user and the modifying_user by returning the + # creation_user of the automatic view as modifying_user. In case of + # troubles, comment next line out. + lappend atts "n.creation_user as modifying_user" + $object db_1row [my qn fetch_from_view_item_id] "\ select [join $atts ,], i.parent_id \ from [my set table_name]i n, cr_items i, acs_objects o \ @@ -906,10 +912,19 @@ @param modifying_user @param live_p make this revision the live revision } { - my instvar creation_user + #my instvar creation_user set __atts [list creation_user] set __vars $__atts + # The modifying_user is not maintained by the CR (bug?) + # xotcl-core handles this by having the modifying user as + # creation_user of the revision. + # + # Caveat: the creation_user fetched is different if we fetch via + # item_id (the creation_user is the creator of the item) or if we + # fetch via revision_id (the creation_user is the creator of the + # revision) + set creation_user [expr {[info exists modifying_user] ? $modifying_user : [my current_user_id]}]