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 -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