From 6f2ac6c7c3b5f462f37fafd11d736465c3374e7f Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 6 Nov 2002 01:42:17 +0000 Subject: [PATCH] Fixed a bug where Message Board postings were being displayed out of order . --- docs/upgrades/upgrade_4.7.0-4.8.0.sql | 3 +-- lib/WebGUI/Wobject/MessageBoard.pm | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/upgrades/upgrade_4.7.0-4.8.0.sql b/docs/upgrades/upgrade_4.7.0-4.8.0.sql index 1ec0f26ba..af0c07007 100644 --- a/docs/upgrades/upgrade_4.7.0-4.8.0.sql +++ b/docs/upgrades/upgrade_4.7.0-4.8.0.sql @@ -1,6 +1,5 @@ insert into webguiVersion values ('4.8.0','upgrade',unix_timestamp()); - - +update incrementer set nextValue=100000 where incrementerId='messageId'; diff --git a/lib/WebGUI/Wobject/MessageBoard.pm b/lib/WebGUI/Wobject/MessageBoard.pm index 8eba8cde0..332fa6c29 100644 --- a/lib/WebGUI/Wobject/MessageBoard.pm +++ b/lib/WebGUI/Wobject/MessageBoard.pm @@ -108,7 +108,7 @@ sub www_view { '.WebGUI::International::get(20,$namespace).''; $sth = WebGUI::SQL->read("select messageId,subject,username,dateOfPost,userId,views,status from discussion where wobjectId=".$_[0]->get("wobjectId")." and pid=0 - and (status='Approved' or userId=$session{user}{userId}) order by messageId desc"); + and (status='Approved' or userId=$session{user}{userId}) order by dateOfPost desc"); while (%data = $sth->hash) { if ($i >= ($_[0]->get("messagesPerPage")*$pn) && $i < ($_[0]->get("messagesPerPage")*($pn+1))) { @last = WebGUI::SQL->quickArray("select messageId,dateOfPost,username,subject,userId