Index: openacs-4/packages/acs-tcl/tcl/object-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/object-procs-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-tcl/tcl/object-procs-oracle.xql 24 Apr 2001 06:02:27 -0000 1.1 +++ openacs-4/packages/acs-tcl/tcl/object-procs-oracle.xql 16 Oct 2003 23:05:41 -0000 1.2 @@ -11,5 +11,25 @@ + + + + select o.object_id, + o.object_type, + o.context_id, + o.security_inherit_p, + o.creation_user, + to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date_ansi, + o.creation_ip, + to_char(o.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, + o.modifying_user, + o.modifying_ip, + o.tree_sortkey, + acs_object.name(o.object_id) + from acs_objects o + where o.object_id = :object_id + + + Index: openacs-4/packages/acs-tcl/tcl/object-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/object-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-tcl/tcl/object-procs-postgresql.xql 24 Apr 2001 06:02:27 -0000 1.1 +++ openacs-4/packages/acs-tcl/tcl/object-procs-postgresql.xql 16 Oct 2003 23:05:41 -0000 1.2 @@ -11,5 +11,26 @@ + + + + select o.object_id, + o.object_type, + o.context_id, + o.security_inherit_p, + o.creation_user, + to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date_ansi, + o.creation_ip, + to_char(o.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, + o.modifying_user, + o.modifying_ip, + o.tree_sortkey, + acs_object__name(o.object_id) + from acs_objects o + where o.object_id = :object_id + + + + Index: openacs-4/packages/acs-tcl/tcl/object-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/object-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-tcl/tcl/object-procs.tcl 10 Sep 2002 22:22:14 -0000 1.2 +++ openacs-4/packages/acs-tcl/tcl/object-procs.tcl 16 Oct 2003 23:05:41 -0000 1.3 @@ -8,6 +8,8 @@ } +namespace eval acs_object {} + ad_proc -private acs_lookup_magic_object { name } { Returns the object ID of a magic object (performing no memoization). @@ -52,3 +54,29 @@ where object_id = :object_id } -default ""] } + +ad_proc acs_object::get { + {-object_id:required} + {-array:required} +} { + Gets information about an acs_object. + + @array The name of an array in the caller's namespace where the info should be delivered. +} { + upvar 1 $array row + db_1row select_object {} -column_array row +} + + +ad_proc acs_object::get_element { + {-object_id:required} + {-element:required} +} { + Gets a specific element from the info returned by acs_object::get. + + @see acs_object::get +} { + acs_object::get -object_id $object_id -array row + return $row($element) +} +