mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Merge branch 'master' of github.com:wbbaddons/Tims-Chat
This commit is contained in:
commit
a11e38dafd
@ -8,7 +8,7 @@
|
||||
* @author Tim Düsterhus
|
||||
* @copyright 2010-2012 Tim Düsterhus
|
||||
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
|
||||
* @package timwolla.wcf.chat
|
||||
* @package be.bastelstu.wcf.chat
|
||||
* @subpackage data.chat.room
|
||||
*/
|
||||
class ChatRoomAction extends \wcf\data\AbstractDatabaseObjectAction {
|
||||
@ -39,10 +39,9 @@ public function create() {
|
||||
FOR UPDATE";
|
||||
$stmt = WCF::getDB()->prepareStatement($sql);
|
||||
$stmt->execute();
|
||||
$row = $stmt->fetchArray();
|
||||
|
||||
$sql = "UPDATE wcf".WCF_N."_chat_room
|
||||
SET position = ".($row['max'] + 1)."
|
||||
SET position = ".($stmt->fetchColumn() + 1)."
|
||||
WHERE roomID = ?";
|
||||
$stmt = WCF::getDB()->prepareStatement($sql);
|
||||
$stmt->execute(array($room->roomID));
|
||||
|
Loading…
Reference in New Issue
Block a user