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 -r1.95.2.5 -r1.95.2.6 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 2 Jan 2016 00:46:28 -0000 1.95.2.5 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 13 Jun 2016 17:15:04 -0000 1.95.2.6 @@ -1294,13 +1294,22 @@ # package_key -> version_id # -ad_proc -public apm_version_id_from_package_key { package_key } { - Return the id of the enabled version of the given package_key. +ad_proc -public apm_version_id_from_package_key { + {-all:boolean} + package_key +} { + Return the id of the (per default enabled) version of the given package_key. If no such version id can be found, returns the empty string. + @param all when specified, return the the enabled or disabled version_id of the package_key. + @param package_key @author Peter Marklund } { - return [db_string get_id {} -default ""] + if {$all_p} { + return [db_string get_id {} -default ""] + } else { + return [db_string get_enabled_id {} -default ""] + } } #