Index: openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql 30 Sep 2003 12:10:03 -0000 1.10
+++ openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql 16 Oct 2003 13:02:46 -0000 1.11
@@ -16,6 +16,18 @@
+
+
+
+ select version_name
+ from apm_package_versions
+ where package_key = :package_key
+ and version_id = apm_package.highest_version(:package_key)
+
+
+
+
+
Index: openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql 1 May 2003 20:40:54 -0000 1.12
+++ openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql 16 Oct 2003 13:02:46 -0000 1.13
@@ -14,6 +14,18 @@
+
+
+
+ select version_name
+ from apm_package_versions
+ where package_key = :package_key
+ and version_id = apm_package__highest_version(:package_key)
+
+
+
+
+
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.59 -r1.60
--- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 13 Oct 2003 17:07:05 -0000 1.59
+++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 16 Oct 2003 13:02:46 -0000 1.60
@@ -698,6 +698,13 @@
}]
}
+ad_proc -public apm_highest_version_name {package_key} {
+ Return the highest version of the indicated package.
+ @return the version_name of the highest installed version of a package.
+} {
+ return [db_string apm_highest_version_name {} -default ""]
+}
+
ad_proc -public apm_num_instances {package_key} {
@return The number of instances of the indicated package.
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.15 -r1.16
--- openacs-4/packages/acs-tcl/tcl/apm-procs.xql 3 Oct 2003 10:13:43 -0000 1.15
+++ openacs-4/packages/acs-tcl/tcl/apm-procs.xql 16 Oct 2003 13:02:46 -0000 1.16
@@ -123,8 +123,8 @@
select pretty_name, version_name, package_key, installed_p, distribution_uri, tagged_p
- apm_package_version_info
- where version_id = :version_id
+ from apm_package_version_info
+ where version_id = :version_id
@@ -176,31 +176,35 @@
- select version_id,
- package_key,
- version_name,
- version_uri,
- summary,
- description_format,
- description,
- to_char(release_date, 'YYYY-MM-DD') as release_date,
- vendor,
- vendor_uri,
- enabled_p,
- installed_p,
- tagged_p,
- imported_p,
- data_model_loaded_p,
- cvs_import_results,
- activation_date,
- deactivation_date,
- item_id,
- content_length,
- distribution_uri,
- distribution_date,
- auto_mount
- from apm_package_versions
- where version_id = :version_id
+ select v.version_id,
+ v.package_key,
+ v.version_name,
+ v.version_uri,
+ v.summary,
+ v.description_format,
+ v.description,
+ v.to_char(release_date, 'YYYY-MM-DD') as release_date,
+ v.vendor,
+ v.vendor_uri,
+ v.enabled_p,
+ v.installed_p,
+ v.tagged_p,
+ v.imported_p,
+ v.data_model_loaded_p,
+ v.cvs_import_results,
+ v.activation_date,
+ v.deactivation_date,
+ v.item_id,
+ v.content_length,
+ v.distribution_uri,
+ v.distribution_date,
+ v.auto_mount,
+ t.pretty_name,
+ t.pretty_plural
+ from apm_package_versions v,
+ apm_package_types t
+ where v.version_id = :version_id
+ and t.package_key = v.package_key