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.114.2.14 -r1.114.2.15 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 1 Sep 2020 17:31:32 -0000 1.114.2.14 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 17 Oct 2020 07:20:35 -0000 1.114.2.15 @@ -970,10 +970,10 @@ Returns 0 otherwise. } { ### Query the database for the indicated package_key - return [db_string apm_package_registered_p { + return [db_0or1row apm_package_registered_p { select 1 from apm_package_types where package_key = :package_key - } -default 0] + }] } ad_proc -public apm_package_installed_p { @@ -992,12 +992,11 @@ ad_proc -private apm_package_installed_p_not_cached { package_key } { - return [db_string apm_package_installed_p { - select case when exists + return [db_0or1row apm_package_installed_p { + select 1 from dual where exists (select 1 from apm_package_versions where package_key = :package_key - and installed_p) then 1 else 0 end - from dual + and installed_p) }] }