mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2025-01-09 00:20: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()) {
|
public static function deleteAll(array $objectIDs = array()) {
|
||||||
$count = parent::deleteAll($objectIDs);
|
$count = parent::deleteAll($objectIDs);
|
||||||
|
|
||||||
|
if ($count) {
|
||||||
// delete attached files
|
// delete attached files
|
||||||
\wcf\system\attachment\AttachmentHandler::removeAttachments('be.bastelstu.chat.message', $objectIDs);
|
\wcf\system\attachment\AttachmentHandler::removeAttachments('be.bastelstu.chat.message', $objectIDs);
|
||||||
|
}
|
||||||
|
|
||||||
return $count;
|
return $count;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user