Index: openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl,v diff -u -N -r1.4 -r1.4.4.1 --- openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl 10 Nov 2003 12:35:13 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl 13 Apr 2005 08:23:29 -0000 1.4.4.1 @@ -94,3 +94,23 @@ where object_type = :object_type } -column_array row } + + +ad_proc -private acs_object_type::get_table_name { + -object_type:required +} { + Return the table name associated with an object_type. + + Allow caching of the table_name as it is unlikely to change without a restart of the server (which is mandatory after an upgrade) +} { + return [util_memoize [list acs_object_type::get_table_name_not_cached -object_type $object_type]] +} + +ad_proc -private acs_object_type::get_table_name_not_cached { + -object_type:required +} { + Return the table name associated with an object_type. + +} { + return [db_string get_table_name ""] +} \ No newline at end of file Index: openacs-4/packages/acs-tcl/tcl/object-type-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/object-type-procs.xql,v diff -u -N -r1.2 -r1.2.6.1 --- openacs-4/packages/acs-tcl/tcl/object-type-procs.xql 24 Apr 2001 23:59:24 -0000 1.2 +++ openacs-4/packages/acs-tcl/tcl/object-type-procs.xql 13 Apr 2005 08:23:29 -0000 1.2.6.1 @@ -7,5 +7,14 @@ + + + + select table_name from acs_object_types + where object_type = :object_type + + + +