Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v diff -u -N -r1.104 -r1.105 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 9 May 2018 15:33:29 -0000 1.104 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 14 May 2018 15:11:33 -0000 1.105 @@ -719,19 +719,6 @@ return $file_type_names($type) } -ad_proc -private apm_pretty_name_for_db_type { db_type } { - - Returns the pretty name corresponding to a particular file type key - (memoizing to save a database hit here and there). - -} { - return [util_memoize [list db_string pretty_db_name_select " - select pretty_db_name - from apm_package_db_types - where db_type_key = :db_type - " -default "all" -bind [list db_type $db_type]]] -} - ad_proc -public apm_load_any_changed_libraries { {errorVarName {}} } { In the running interpreter, reloads files marked for reload by @@ -2118,7 +2105,31 @@ } + # +### Deprecated procs +# + +# apisano 2018-05-14: there is a thread cache for this now, no need +# IMO to maintain a datamodel to know which databases we +# support. Original code is the commented one. +ad_proc -deprecated -private apm_pretty_name_for_db_type { db_type } { + + Returns the pretty name corresponding to a particular file type key + (memoizing to save a database hit here and there). + +} { + set pos [lsearch -index 0 -exact $::acs::known_database_types $db_type] + return [lindex [lindex $::acs::known_database_types $pos] 2] + # return [util_memoize [list db_string pretty_db_name_select " + # select pretty_db_name + # from apm_package_db_types + # where db_type_key = :db_type + # " -default "all" -bind [list db_type $db_type]]] +} + + +# # Local variables: # mode: tcl # tcl-indent-level: 4