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.6 -r1.7 --- openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl 11 Apr 2005 22:18:48 -0000 1.6 +++ openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl 13 Apr 2005 08:23:59 -0000 1.7 @@ -141,3 +141,22 @@ -no_cache]] } } + +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_ty\pe]] +} + +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 -r1.2 -r1.3 --- 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:59 -0000 1.3 @@ -7,5 +7,13 @@ + + + + select table_name from acs_object_types + where object_type = :object_type + + +