Index: openacs-4/packages/forums/www/user-history.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/user-history.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/forums/www/user-history.tcl 3 Jun 2002 16:33:01 -0000 1.3 +++ openacs-4/packages/forums/www/user-history.tcl 2 Jul 2002 20:00:23 -0000 1.4 @@ -17,20 +17,25 @@ set dimensional_list { { view "View:" date { - {date "by Date" { order by date desc } } - {forum "by Forum" { order by forums_forums.name, date desc } } + {date "by Date" {}} + {forum "by Forum" {}} } } } -set sql_order_by [ad_dimensional_sql $dimensional_list] +set query select_messages +if {[string equal $view forum]} { + set query select_messages_by_forum +} # Select the postings -db_multirow messages select_messages {} +db_multirow messages $query {} # Get user information oacs::user::get -user_id $user_id -array user set dimensional_chunk [ad_dimensional $dimensional_list] + set context_bar {{Posting History}} + ad_return_template Index: openacs-4/packages/forums/www/user-history.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/user-history.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/www/user-history.xql 3 Jun 2002 16:33:01 -0000 1.1 +++ openacs-4/packages/forums/www/user-history.xql 2 Jul 2002 20:00:23 -0000 1.2 @@ -14,8 +14,25 @@ where forums_messages.user_id = :user_id and forums_messages.forum_id = forums_forums.forum_id and forums_forums.package_id = :package_id - $sql_order_by + order by forums_messages.posting_date desc + + + select forums_messages.message_id, + forums_messages.subject, + to_char(forums_messages.posting_date, 'Mon DD YYYY HH24:MI:SS') as posting_date, + forums_forums.forum_id, + forums_forums.name as forum_name + from forums_messages, + forums_forums + where forums_messages.user_id = :user_id + and forums_messages.forum_id = forums_forums.forum_id + and forums_forums.package_id = :package_id + order by forum_name, + forums_messages.posting_date desc + + +