mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Transaction is only committed when the parent call succeeds as well
This commit is contained in:
parent
a11e38dafd
commit
c18b9e739b
@ -22,7 +22,6 @@ class ChatRoomEditor extends \wcf\data\DatabaseObjectEditor implements \wcf\data
|
|||||||
* @see \wcf\data\DatabaseObjectEditor::deleteAll()
|
* @see \wcf\data\DatabaseObjectEditor::deleteAll()
|
||||||
*/
|
*/
|
||||||
public static function deleteAll(array $objectIDs = array()) {
|
public static function deleteAll(array $objectIDs = array()) {
|
||||||
parent::deleteAll($objectIDs);
|
|
||||||
$packageID = \wcf\util\ChatUtil::getPackageID();
|
$packageID = \wcf\util\ChatUtil::getPackageID();
|
||||||
|
|
||||||
WCF::getDB()->beginTransaction();
|
WCF::getDB()->beginTransaction();
|
||||||
@ -30,9 +29,10 @@ public static function deleteAll(array $objectIDs = array()) {
|
|||||||
\wcf\system\language\I18nHandler::getInstance()->remove('wcf.chat.room.title'.$objectID, $packageID);
|
\wcf\system\language\I18nHandler::getInstance()->remove('wcf.chat.room.title'.$objectID, $packageID);
|
||||||
\wcf\system\language\I18nHandler::getInstance()->remove('wcf.chat.room.topic'.$objectID, $packageID);
|
\wcf\system\language\I18nHandler::getInstance()->remove('wcf.chat.room.topic'.$objectID, $packageID);
|
||||||
}
|
}
|
||||||
WCF::getDB()->commitTransaction();
|
|
||||||
|
|
||||||
return count($objectIDs);
|
// The transaction is being committed in parent::deleteAll()
|
||||||
|
// The beginTransaction() call in there is simply ignored.
|
||||||
|
return parent::deleteAll($objectIDs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user