1
0
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:
Tim Düsterhus 2012-03-22 16:26:52 +01:00
parent a11e38dafd
commit c18b9e739b

View File

@ -22,7 +22,6 @@ class ChatRoomEditor extends \wcf\data\DatabaseObjectEditor implements \wcf\data
* @see \wcf\data\DatabaseObjectEditor::deleteAll()
*/
public static function deleteAll(array $objectIDs = array()) {
parent::deleteAll($objectIDs);
$packageID = \wcf\util\ChatUtil::getPackageID();
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.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);
}
/**