Index: openacs-4/packages/download/www/admin/report-version-downloads-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-version-downloads-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/download/www/admin/report-version-downloads-postgresql.xql 22 May 2001 04:17:45 -0000 1.1
+++ openacs-4/packages/download/www/admin/report-version-downloads-postgresql.xql 23 May 2001 01:00:43 -0000 1.2
@@ -4,60 +4,71 @@
postgresql7.1
-
+
- select u.last_name || ', ' || u.first_names as user_name,
- d.download_date,
- d.download_ip,
- coalesce(d.download_hostname,'unavailable') as download_hostname,
- coalesce(dar.version_name, 'unnamed') as version_name,
- dar.revision_id,
- u.user_id,
- u.email,
- case when d.reason_id is not null then d.reason else dr.reason end as reason
- from download_downloads d left join download_reasons
- on (d.reason_id=dr.download_reason_id),
- download_arch_revisions_obj dar,
- cc_users u
- where d.user_id = u.user_id
- and dar.archive_id = :archive_id
- and dar.revision_id = d.revision_id
- [ad_dimensional_sql $dimensional where]
- [ad_order_by_from_sort_spec $orderby $table_def]
+select u.last_name || ', ' || u.first_names as user_name,
+ d.download_date,
+ d.download_ip,
+ coalesce(d.download_hostname,'unavailable') as download_hostname,
+ coalesce(dar.version_name, 'unnamed') as version_name,
+ dar.revision_id,
+ u.user_id,
+ u.email,
+ case when d.reason_id is null then d.reason else dr.reason end as reason
+from download_downloads d left join download_reasons dr
+ on (d.reason_id=dr.download_reason_id),
+ download_arch_revisions_obj dar,
+ cc_users u
+where d.user_id = u.user_id
+ and dar.archive_id = :archive_id
+ and dar.revision_id = d.revision_id
+ [ad_dimensional_sql $dimensional where]
+ [ad_order_by_from_sort_spec $orderby $table_def]
-
+
+
+
-
+
- dar.revision_id = content_item__get_live_revision(dar.archive_id)
+dar.revision_id = content_item__get_live_revision(dar.archive_id)
-
+
+
+
-
+
- d.download_date + '1 days'::interval > current_timestamp
+d.download_date + '1 days'::interval > current_timestamp
-
+
+
+
-
+
- d.download_date + '7 days'::interval > current_timestamp
+d.download_date + '7 days'::interval > current_timestamp
-
+
+
+
-
+
- d.download_date + '30 days'::interval > current_timestamp
+d.download_date + '30 days'::interval > current_timestamp
-
+
+
+
+
Index: openacs-4/packages/download/www/admin/repository-metadata.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/download/www/admin/repository-metadata.xql 22 May 2001 04:17:45 -0000 1.2
+++ openacs-4/packages/download/www/admin/repository-metadata.xql 23 May 2001 01:00:43 -0000 1.3
@@ -2,75 +2,84 @@
-
+
- select pretty_name, archive_type_id from download_archive_types where repository_id = $repository_id
-
+select pretty_name, archive_type_id
+from download_archive_types
+where repository_id = $repository_id
+
+
+
-
+
- insert into download_archive_metadata (
- metadata_id,
- repository_id,
- archive_type_id,
- sort_key,
- pretty_name,
- data_type,
- required_p,
- linked_p,
- mainpage_p,
- computed_p)
- values (
- :metadata_id,
- :repository_id,
- :archive_type_id,
- :sort_key,
- :pretty_name,
- :data_type,
- :required_p,
- :linked_p,
- :mainpage_p,
- :computed_p)
+insert into download_archive_metadata (
+ metadata_id,
+ repository_id,
+ archive_type_id,
+ sort_key,
+ pretty_name,
+ data_type,
+ required_p,
+ linked_p,
+ mainpage_p,
+ computed_p)
+values (
+ :metadata_id,
+ :repository_id,
+ :archive_type_id,
+ :sort_key,
+ :pretty_name,
+ :data_type,
+ :required_p,
+ :linked_p,
+ :mainpage_p,
+ :computed_p)
-
+
+
-
+
- insert into download_metadata_choices (choice_id, metadata_id, label, sort_order)
- values (download_md_choice_id_sequence.nextval, :metadata_id, :choice, :count)
+insert into download_metadata_choices
+(choice_id, metadata_id, label, sort_order)
+values
+(download_md_choice_id_sequence.nextval, :metadata_id, :choice, :count)
-
+
+
-
+
- select
- dam.metadata_id,
- dam.repository_id,
- dam.archive_type_id,
- coalesce(dat.pretty_name, 'All') as archive_name,
- dam.sort_key,
- dam.pretty_name,
- dam.data_type,
- dam.required_p,
- dam.linked_p,
- dam.mainpage_p,
- dam.computed_p
- from download_archive_metadata dam left join download_archive_types dat
- using archive_type_id
- where dam.repository_id = :repository_id
- order by archive_type_id, sort_key
+select
+ dam.metadata_id,
+ dam.repository_id,
+ dam.archive_type_id,
+ coalesce(dat.pretty_name, 'All') as archive_name,
+ dam.sort_key,
+ dam.pretty_name,
+ dam.data_type,
+ dam.required_p,
+ dam.linked_p,
+ dam.mainpage_p,
+ dam.computed_p
+from download_archive_metadata dam left join download_archive_types dat
+ using (archive_type_id)
+where dam.repository_id = :repository_id
+order by archive_type_id, sort_key
-
+
+