Index: openacs-4/packages/lars-blogger/www/blog-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog-postgresql.xql,v
diff -u -N -r1.5 -r1.6
--- openacs-4/packages/lars-blogger/www/blog-postgresql.xql 27 Jan 2003 16:19:27 -0000 1.5
+++ openacs-4/packages/lars-blogger/www/blog-postgresql.xql 28 Aug 2003 09:41:55 -0000 1.6
@@ -11,22 +11,24 @@
- entry_date > current_timestamp - interval '30 days'
+ entry_date > current_timestamp - interval '$num_days days'
-
+
select entry_id,
to_char(entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty,
to_char(entry_date, 'YYYY/MM/DD/') as entry_archive_url,
to_char(entry_date, 'YYYY-MM-DD') as entry_date,
title,
+ title_url,
content,
content_format,
draft_p,
p.first_names as poster_first_names,
p.last_name as poster_last_name,
+ o.creation_user as user_id,
to_char(posted_date , 'HH24:MI') as posted_time_pretty,
(select count(gc.comment_id)
from general_comments gc, cr_revisions cr
@@ -36,11 +38,43 @@
acs_objects o on (o.object_id = e.entry_id) join
persons p on (p.person_id = o.creation_user)
where package_id = :package_id
- and $date_clause
+ [ad_decode $date_clause "" "" "and $date_clause"]
and draft_p = 'f'
and deleted_p = 'f'
order by entry_date desc, posted_date desc
+ [ad_decode $limit "" "" "limit $limit"]
+
+
+ select entry_id,
+ to_char(entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty,
+ to_char(entry_date, 'YYYY/MM/DD/') as entry_archive_url,
+ to_char(entry_date, 'YYYY-MM-DD') as entry_date,
+ title,
+ content,
+ content_format,
+ draft_p,
+ p.first_names as poster_first_names,
+ p.last_name as poster_last_name,
+ o.creation_user as user_id,
+ to_char(posted_date , 'HH24:MI') as posted_time_pretty,
+ (select count(gc.comment_id)
+ from general_comments gc, cr_revisions cr
+ where gc.object_id = entry_id
+ and content_item__get_live_revision(gc.comment_id) = cr.revision_id) as num_comments
+ from pinds_blog_entries e join
+ acs_objects o on (o.object_id = e.entry_id) join
+ persons p on (p.person_id = o.creation_user)
+ where package_id = :package_id
+ and o.creation_user = :blog_user_id
+ [ad_decode $date_clause "" "" "and $date_clause"]
+ and draft_p = 'f'
+ and deleted_p = 'f'
+ order by entry_date desc, posted_date desc
+ [ad_decode $limit "" "" "limit $limit"]
+
+
+