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:
parent
0580009992
commit
dcd76ab108
@ -21,8 +21,11 @@ class MessageEditor extends \wcf\data\DatabaseObjectEditor {
|
||||
*/
|
||||
public static function deleteAll(array $objectIDs = array()) {
|
||||
$count = parent::deleteAll($objectIDs);
|
||||
// delete attached files
|
||||
\wcf\system\attachment\AttachmentHandler::removeAttachments('be.bastelstu.chat.message', $objectIDs);
|
||||
|
||||
if ($count) {
|
||||
// delete attached files
|
||||
\wcf\system\attachment\AttachmentHandler::removeAttachments('be.bastelstu.chat.message', $objectIDs);
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user