mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Fix CHAT_LASTMESSAGES === 0
This commit is contained in:
parent
b9187bfb6d
commit
e0859c5952
@ -24,6 +24,8 @@ class MessageList extends \wcf\data\DatabaseObjectList {
|
||||
* @return array<\chat\data\message\Message>
|
||||
*/
|
||||
public static function getNewestMessages(\chat\data\room\Room $room, $number = CHAT_LASTMESSAGES) {
|
||||
if ($number === 0) return array();
|
||||
|
||||
$messageList = new static();
|
||||
$messageList->sqlOrderBy = "message.messageID DESC";
|
||||
$messageList->sqlLimit = $number;
|
||||
|
Loading…
Reference in New Issue
Block a user