Fixed a bug where Message Board postings were being displayed out of order .

This commit is contained in:
JT Smith 2002-11-06 01:42:17 +00:00
parent accaf50188
commit 6f2ac6c7c3
2 changed files with 2 additions and 3 deletions

View file

@ -108,7 +108,7 @@ sub www_view {
<td class="tableHeader">'.WebGUI::International::get(20,$namespace).'</td></tr>';
$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