Index: openacs-4/packages/forums/lib/message/threads-chunk-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/Attic/threads-chunk-oracle.xql,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/forums/lib/message/threads-chunk-oracle.xql 17 Dec 2003 15:45:29 -0000 1.1 +++ openacs-4/packages/forums/lib/message/threads-chunk-oracle.xql 4 Dec 2004 03:06:55 -0000 1.1.2.1 @@ -11,39 +11,19 @@ to_char(fm.posting_date, 'YYYY-MM-DD HH24:MI:SS') as posting_date_ansi, fm.state, (select count(*) - from forums_messages_approved fm1 + from $replies_view fm1 where fm1.forum_id = :forum_id and fm1.tree_sortkey between tree.left(fm.tree_sortkey) and tree.right(fm.tree_sortkey)) as n_messages, to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi, case when fm.last_child_post > (sysdate - 1) then 't' else 'f' end as new_p from forums_messages_approved fm where fm.forum_id = :forum_id and fm.parent_id is null + [template::list::page_where_clause -and -name messages -key fm.message_id] [template::list::orderby_clause -orderby -name "messages"] - - - select fm.message_id, - fm.subject, - fm.user_id, - person.name(fm.user_id) as user_name, - to_char(fm.posting_date, 'YYYY-MM-DD HH24:MI:SS') as posting_date_ansi, - fm.state, - (select count(*) - from forums_messages fm1 - where fm1.forum_id = :forum_id - and fm1.tree_sortkey between tree.left(fm.tree_sortkey) and tree.right(fm.tree_sortkey)) as n_messages, - to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi, - case when fm.last_child_post > (sysdate - 1) then 't' else 'f' end as new_p - from forums_messages fm - where fm.forum_id = :forum_id - and fm.parent_id is null - [template::list::orderby_clause -orderby -name "messages"] - - - user_name desc Index: openacs-4/packages/forums/lib/message/threads-chunk-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/Attic/threads-chunk-postgresql.xql,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/forums/lib/message/threads-chunk-postgresql.xql 17 Dec 2003 15:45:29 -0000 1.1 +++ openacs-4/packages/forums/lib/message/threads-chunk-postgresql.xql 4 Dec 2004 03:06:55 -0000 1.1.2.1 @@ -11,39 +11,19 @@ to_char(fm.posting_date, 'YYYY-MM-DD HH24:MI:SS') as posting_date_ansi, fm.state, (select count(*) - from forums_messages_approved fm1 + from $replies_view fm1 where fm1.forum_id = :forum_id and fm1.tree_sortkey between tree_left(fm.tree_sortkey) and tree_right(fm.tree_sortkey)) as n_messages, to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi, case when fm.last_child_post > (now() - interval '1 day') then 't' else 'f' end as new_p from forums_messages_approved fm where fm.forum_id = :forum_id and fm.parent_id is null - [template::list::orderby_clause -orderby -name "messages"] + [template::list::page_where_clause -and -name messages -key fm.message_id] + [template::list::orderby_clause -orderby -name messages] - - - select fm.message_id, - fm.subject, - fm.user_id, - person__name(fm.user_id) as user_name, - to_char(fm.posting_date, 'YYYY-MM-DD HH24:MI:SS') as posting_date_ansi, - fm.state, - (select count(*) - from forums_messages fm1 - where fm1.forum_id = :forum_id - and fm1.tree_sortkey between tree_left(fm.tree_sortkey) and tree_right(fm.tree_sortkey)) as n_messages, - to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi, - case when fm.last_child_post > (now() - interval '1 day') then 't' else 'f' end as new_p - from forums_messages_approved fm - where fm.forum_id = :forum_id - and fm.parent_id is null - [template::list::orderby_clause -orderby -name "messages"] - - - lower(person__name(fm.user_id)) desc Index: openacs-4/packages/forums/lib/message/threads-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/threads-chunk.tcl,v diff -u -r1.2.2.3 -r1.2.2.4 --- openacs-4/packages/forums/lib/message/threads-chunk.tcl 30 Jul 2004 02:06:47 -0000 1.2.2.3 +++ openacs-4/packages/forums/lib/message/threads-chunk.tcl 4 Dec 2004 03:06:55 -0000 1.2.2.4 @@ -13,7 +13,9 @@ set query messages_select if { $moderate_p } { - set query messages_select_moderator + set replies_view forums_messages +} else { + set replies_view forums_messages_approved } set actions [list] @@ -38,6 +40,8 @@ template::list::create \ -name messages \ -multirow messages \ + -page_size 30 \ + -page_query_name messages_select_paginate \ -pass_properties { moderate_p } \ -actions $actions \ -elements { @@ -106,7 +110,7 @@ user_url n_messages_pretty state_pretty -} messages $query {} { +} messages messages_select {} { set last_child_post_ansi [lc_time_system_to_conn $last_child_post_ansi] set last_child_post_pretty [lc_time_fmt $last_child_post_ansi "%x %X"] Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/forums/lib/message/threads-chunk.xql'. Fisheye: No comparison available. Pass `N' to diff?