Index: openacs-4/packages/general-comments/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/Attic/index-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/index-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 +++ openacs-4/packages/general-comments/www/index-postgresql.xql 15 Nov 2002 11:16:55 -0000 1.2 @@ -5,23 +5,24 @@ - + select * from ( select g.comment_id, r.title, acs_object__name(o.creation_user) as author, o.creation_user, case when i.live_revision=null then 0 else 1 end as live_version_p, case when i.live_revision=r.revision_id then 0 else 1 end as approved_p, - to_char(o.creation_date, 'MM-DD-YYYY HH12:MI:AM') as pretty_date + to_char(o.creation_date, 'MM-DD-YYYY HH12:MI:AM') as pretty_date, + o.creation_date from general_comments g, cr_items i, cr_revisions r, acs_objects o where g.comment_id = i.item_id and r.revision_id = o.object_id and - r.revision_id = content_item__get_latest_revision(g.comment_id) and + r.revision_id = i.latest_revision and o.creation_user = :user_id - [ad_dimensional_sql $dimensional] + [ad_dimensional_sql $dimensional]) as unordered [ad_order_by_from_sort_spec $orderby $table_def] @@ -31,23 +32,23 @@ - creation_date + '1 days'::interval > now() + creation_date > now() - '1 days'::interval - creation_date + '7 days'::interval > now() + creation_date > now() - '7 days'::interval - creation_date + '30 days'::interval > now() + creation_date > now() - '30 days'::interval Index: openacs-4/packages/general-comments/www/admin/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/admin/Attic/index-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/general-comments/www/admin/index-postgresql.xql 14 Jun 2001 19:52:22 -0000 1.1 +++ openacs-4/packages/general-comments/www/admin/index-postgresql.xql 15 Nov 2002 11:16:56 -0000 1.2 @@ -5,22 +5,23 @@ - + select * from ( select g.comment_id, r.title, acs_object__name(o.creation_user) as author, o.creation_user, case when i.live_revision = null then 0 else 1 end as live_version_p, case when i.live_revision = r.revision_id then 1 else 0 end as approved_p, - to_char(o.creation_date, 'MM-DD-YYYY HH12:MI:AM') as pretty_date + to_char(o.creation_date, 'MM-DD-YYYY HH12:MI:AM') as pretty_date, + o.creation_date from general_comments g, cr_items i, cr_revisions r, acs_objects o where g.comment_id = i.item_id and r.revision_id = o.object_id and - r.revision_id = content_item__get_latest_revision(g.comment_id) - [ad_dimensional_sql $dimensional] + r.revision_id = i.latest_revision + [ad_dimensional_sql $dimensional]) as unordered [ad_order_by_from_sort_spec $orderby $table_def] @@ -30,24 +31,23 @@ - creation_date + '1 days'::interval > now() + creation_date > now() - '1 days'::interval - creation_date + '7 days'::interval > now() + creation_date > now() - '7 days'::interval - creation_date + '30 days'::interval > now() - + creation_date > now() - '30 days'::interval