Fixed a problem where prev/next buttons could allow a user to view a message that wasn't approved.
This commit is contained in:
parent
1e8908a866
commit
94a1212051
1 changed files with 4 additions and 2 deletions
|
|
@ -398,13 +398,15 @@ sub showMessage {
|
|||
.'">'.WebGUI::International::get(577).'</a><br>';
|
||||
}
|
||||
@data = WebGUI::SQL->quickArray("select max(messageId) from discussion
|
||||
where wobjectId=$message{wobjectId} and pid=0 and messageId<$message{rid}".$sqlAdd);
|
||||
where wobjectId=$message{wobjectId} and pid=0 and messageId<$message{rid}
|
||||
and (userId=$session{user}{userId} or status='Approved') ".$sqlAdd);
|
||||
if ($data[0] ne "") {
|
||||
$html .= '<a href="'.WebGUI::URL::page('func=showMessage&mid='.$data[0].'&sid='.$session{form}{sid}.'&wid='.
|
||||
$session{form}{wid}).'">« '.WebGUI::International::get(513).'</a><br>';
|
||||
}
|
||||
@data = WebGUI::SQL->quickArray("select min(messageId) from discussion
|
||||
where wobjectId=$message{wobjectId} and pid=0 and messageId>$message{rid}".$sqlAdd);
|
||||
where wobjectId=$message{wobjectId} and pid=0 and messageId>$message{rid}
|
||||
and (userId=$session{user}{userId} or status='Approved')".$sqlAdd);
|
||||
if ($data[0] ne "") {
|
||||
$html .= '<a href="'.WebGUI::URL::page('func=showMessage&mid='.$data[0].'&sid='.$session{form}{sid}.'&wid='.
|
||||
$session{form}{wid}).'">'.WebGUI::International::get(512).' »</a><br>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue