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

Delete attached files on deletion of messages

This commit is contained in:
Maximilian Mader 2013-10-16 20:16:31 +02:00
parent 86ac2861f8
commit 92ee11daba

View File

@ -16,6 +16,17 @@ class MessageEditor extends \wcf\data\DatabaseObjectEditor {
*/
protected static $baseClass = '\chat\data\message\Message';
/**
* @see wcf\data\DatabaseObjectEditor::deleteAll()
*/
public static function deleteAll(array $objectIDs = array()) {
$count = parent::deleteAll($objectIDs);
// delete attached files
\wcf\system\attachment\AttachmentHandler::removeAttachments('be.bastelstu.chat.message', $objectIDs);
return $count;
}
/**
* Notify the Push-Server.
*/