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:
parent
86ac2861f8
commit
92ee11daba
@ -16,6 +16,17 @@ class MessageEditor extends \wcf\data\DatabaseObjectEditor {
|
|||||||
*/
|
*/
|
||||||
protected static $baseClass = '\chat\data\message\Message';
|
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.
|
* Notify the Push-Server.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user