Fixed a bug where Message Board postings were being displayed out of order .
This commit is contained in:
parent
accaf50188
commit
6f2ac6c7c3
2 changed files with 2 additions and 3 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
insert into webguiVersion values ('4.8.0','upgrade',unix_timestamp());
|
insert into webguiVersion values ('4.8.0','upgrade',unix_timestamp());
|
||||||
|
update incrementer set nextValue=100000 where incrementerId='messageId';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ sub www_view {
|
||||||
<td class="tableHeader">'.WebGUI::International::get(20,$namespace).'</td></tr>';
|
<td class="tableHeader">'.WebGUI::International::get(20,$namespace).'</td></tr>';
|
||||||
$sth = WebGUI::SQL->read("select messageId,subject,username,dateOfPost,userId,views,status
|
$sth = WebGUI::SQL->read("select messageId,subject,username,dateOfPost,userId,views,status
|
||||||
from discussion where wobjectId=".$_[0]->get("wobjectId")." and pid=0
|
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) {
|
while (%data = $sth->hash) {
|
||||||
if ($i >= ($_[0]->get("messagesPerPage")*$pn) && $i < ($_[0]->get("messagesPerPage")*($pn+1))) {
|
if ($i >= ($_[0]->get("messagesPerPage")*$pn) && $i < ($_[0]->get("messagesPerPage")*($pn+1))) {
|
||||||
@last = WebGUI::SQL->quickArray("select messageId,dateOfPost,username,subject,userId
|
@last = WebGUI::SQL->quickArray("select messageId,dateOfPost,username,subject,userId
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue