1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Fix MessageEditor::deleteAll() when no message was deleted

Thanks @Gravatronics
This commit is contained in:
Tim Düsterhus 2013-11-18 21:28:56 +01:00
parent 0580009992
commit dcd76ab108

View File

@ -21,8 +21,11 @@ class MessageEditor extends \wcf\data\DatabaseObjectEditor {
*/
public static function deleteAll(array $objectIDs = array()) {
$count = parent::deleteAll($objectIDs);
if ($count) {
// delete attached files
\wcf\system\attachment\AttachmentHandler::removeAttachments('be.bastelstu.chat.message', $objectIDs);
}
return $count;
}