Index: openacs-4/packages/acs-content-repository/acs-content-repository.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/acs-content-repository.info,v diff -u -r1.115 -r1.116 --- openacs-4/packages/acs-content-repository/acs-content-repository.info 21 Feb 2018 14:00:56 -0000 1.115 +++ openacs-4/packages/acs-content-repository/acs-content-repository.info 15 Jun 2018 08:30:12 -0000 1.116 @@ -24,7 +24,7 @@ - + Index: openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl,v diff -u -r1.30 -r1.31 --- openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 23 Apr 2018 16:58:39 -0000 1.30 +++ openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 15 Jun 2018 08:30:12 -0000 1.31 @@ -248,16 +248,12 @@ if {"content_folder" eq $content_type} { return [db_0or1row get_item_folder "" -column_array local_array] } - set table_name [db_string get_table_name { - select table_name from acs_object_types where object_type = :content_type - }] + set table_name [acs_object_type::get_table_name -object_type $content_type] while {$table_name eq ""} { acs_object_type::get -object_type $content_type -array typeInfo ns_log notice "no table for $content_type registered, trying '$typeInfo(supertype)' instead" set content_type $typeInfo(supertype) - set table_name [db_string get_table_name { - select table_name from acs_object_types where object_type = :content_type - }] + set table_name [acs_object_type::get_table_name -object_type $content_type] } set table_name "${table_name}x" # get attributes of the content_item use the content_typex view @@ -1091,10 +1087,7 @@ } # Get the table name - set table_name [db_string grc_get_table_names { - select table_name from acs_object_types - where object_type = :content_type - }] + set table_name [acs_object_type::get_table_name -object_type $content_type] upvar content content Index: openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 17 May 2018 08:35:50 -0000 1.31 +++ openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 15 Jun 2018 08:30:12 -0000 1.32 @@ -131,10 +131,7 @@ } } - set table_name [db_string get_table_name { - select table_name from acs_object_types where object_type = :content_type - }] - + set table_name [acs_object_type::get_table_name -object_type $content_type] set mime_type [cr_check_mime_type \ -filename $title \ -mime_type $mime_type \ Index: openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl,v diff -u -r1.38 -r1.39 --- openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl 22 Jan 2018 10:43:06 -0000 1.38 +++ openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl 15 Jun 2018 08:30:12 -0000 1.39 @@ -118,6 +118,7 @@ # Get the table name set table_name [db_string get_table_name ""] + set table_name [acs_object_type::get_table_name -object_type $content_type] upvar content content Index: openacs-4/packages/acs-content-repository/tcl/filter-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/filter-procs.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-content-repository/tcl/filter-procs.xql 7 Aug 2017 23:47:47 -0000 1.5 +++ openacs-4/packages/acs-content-repository/tcl/filter-procs.xql 15 Jun 2018 08:30:12 -0000 1.6 @@ -27,15 +27,6 @@ - - - - select table_name from acs_object_types - where object_type = :content_type - - - - Index: openacs-4/packages/acs-tcl/acs-tcl.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/acs-tcl.info,v diff -u -r1.80 -r1.81 --- openacs-4/packages/acs-tcl/acs-tcl.info 31 May 2018 10:54:19 -0000 1.80 +++ openacs-4/packages/acs-tcl/acs-tcl.info 15 Jun 2018 08:30:12 -0000 1.81 @@ -9,7 +9,7 @@ f t - + OpenACS The Kernel Tcl API library. 2017-08-06 @@ -18,7 +18,7 @@ GPL version 2 3 - + 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.12 -r1.13 --- openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl 7 Aug 2017 23:47:59 -0000 1.12 +++ openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl 15 Jun 2018 08:30:12 -0000 1.13 @@ -142,14 +142,16 @@ } } -ad_proc -private acs_object_type::get_table_name { +ad_proc 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) + 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]] + 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 { @@ -158,7 +160,10 @@ Return the table name associated with an object_type. } { - return [db_string get_table_name ""] + return [db_string get_table_name { + select table_name from acs_object_types + where object_type = :object_type + }] } # Local variables: Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/acs-tcl/tcl/object-type-procs.xql'. Fisheye: No comparison available. Pass `N' to diff?