Index: openacs-4/packages/acs-admin/www/apm/version-view-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-admin/www/apm/version-view-oracle.xql 27 Apr 2001 01:41:12 -0000 1.1 +++ openacs-4/packages/acs-admin/www/apm/version-view-oracle.xql 25 Sep 2017 17:47:11 -0000 1.2 @@ -5,9 +5,9 @@ - select version_id as installed_version_id, version_name as installed_version_name, - enabled_p as installed_enabled_p, - apm_package_version.version_name_greater(version_name, :version_name) as version_name_greater + select version_id as installed_version_id, + version_name as installed_version_name, + enabled_p as installed_enabled_p from apm_package_versions where package_key = :package_key and installed_p = 't' Index: openacs-4/packages/acs-admin/www/apm/version-view-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-admin/www/apm/version-view-postgresql.xql 27 Apr 2001 01:41:12 -0000 1.1 +++ openacs-4/packages/acs-admin/www/apm/version-view-postgresql.xql 25 Sep 2017 17:47:11 -0000 1.2 @@ -5,9 +5,9 @@ - select version_id as installed_version_id, version_name as installed_version_name, - enabled_p as installed_enabled_p, - apm_package_version__version_name_greater(version_name, :version_name) as version_name_greater + select version_id as installed_version_id, + version_name as installed_version_name, + enabled_p as installed_enabled_p from apm_package_versions where package_key = :package_key and installed_p = 't' Index: openacs-4/packages/acs-admin/www/apm/version-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view.tcl,v diff -u -r1.23 -r1.24 --- openacs-4/packages/acs-admin/www/apm/version-view.tcl 7 Aug 2017 23:47:45 -0000 1.23 +++ openacs-4/packages/acs-admin/www/apm/version-view.tcl 25 Sep 2017 17:47:11 -0000 1.24 @@ -41,7 +41,9 @@ # We use rownum = 1 in case someone mucks up the database and leaves two package versions # installed and enabled. db_0or1row apm_enabled_version_info {} +set installed_version_name_greater_p [expr {[apm_version_names_compare $installed_version_name $version_name] == 1}] + db_0or1row apm_data_model_install_version {} if { $vendor eq "" } { @@ -86,10 +88,10 @@ } } else { set status [subst { - [ad_decode $version_name_greater -1 "An older" "A newer"] version of this package, + [expr {$installed_version_name_greater_p ? "A newer" : "An older"}] version of this package, version $installed_version_name, is installed and [ad_decode $installed_enabled_p "t" "enabled" "disabled"]. }] - if { $version_name_greater < 0 } { + if { !$installed_version_name_greater_p } { set href [export_vars -base version-upgrade {version_id}] append body [subst { You may upgrade to this version now.