-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Закрытие задачи модерации комментариев при удалении субъекта
close #1418 Сохранение нуля в полях "текст" и "строковое поле" + немного рефакторинга.
- Loading branch information
Showing
7 changed files
with
180 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
system/controllers/moderation/hooks/comments_after_delete_list.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
class onModerationCommentsAfterDeleteList extends cmsAction { | ||
|
||
public function run($ids){ | ||
|
||
foreach ($ids as $comment_id) { | ||
|
||
$this->model->closeModeratorTask('comments', $comment_id, false, $this->cms_user->id); | ||
|
||
if(!empty($this->options['clear_log_after_delete'])){ | ||
$this->model->logDeleteTarget('comments', 'comments', $comment_id); | ||
} | ||
} | ||
|
||
return $ids; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.