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.26 -r1.27 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 22 Nov 2002 13:00:25 -0000 1.26 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 13 Jan 2003 19:14:16 -0000 1.27 @@ -533,23 +533,15 @@ Returns 1 if there is an installed package version corresponding to the package_key, 0 otherwise } { - return [db_string apm_package_installed_p { - select 1 from apm_package_versions - where package_key = :package_key - and installed_p = 't' - } -default 0] + return [db_string apm_package_installed_p {} -default 0] } ad_proc -public apm_version_installed_p { version_id } { @return Returns 1 if the specified version_id is installed, 0 otherwise. } { - return [db_string apm_version_installed_p { - select 1 from apm_package_versions - where version_id = :version_id - and installed_p = 't' - } -default 0] + return [db_string apm_version_installed_p {} -default 0] } ad_proc -public apm_highest_version {package_key} { @@ -899,23 +891,15 @@ @return 1 if the indiciated package version is installed, 0 otherwise. } { - return [db_string apm_package_version_installed_p { - select decode(count(*), 0, 0, 1) from apm_package_versions - where package_key = :package_key - and version_name = :version_name - } -default 0] + return [db_string apm_package_version_installed_p {}] } ad_proc -public apm_package_version_enabled_p {version_id} { @return 1 if the indiciated package version is installed, 0 otherwise. } { - return [db_string apm_package_version_installed_p { - select decode(count(*), 0, 0, 1) from apm_package_versions - where version_id = :version_id - and enabled_p = 't' - } -default 0] + return [db_string apm_package_version_enabled_p {}] } Index: openacs-4/packages/acs-tcl/tcl/apm-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-tcl/tcl/apm-procs.xql 30 Nov 2002 17:23:55 -0000 1.6 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.xql 13 Jan 2003 19:14:16 -0000 1.7 @@ -1,7 +1,7 @@ - + select case when count(*) = 0 then 0 else 1 end from apm_package_versions where version_id = :version_id