diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-30 23:04:02 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-30 23:04:02 +0200 |
| commit | be52ea882ad55af8bd8a59814b11488025fb3563 (patch) | |
| tree | 4fe84ac9dde88730fefc7a2b045e70255a5e11be /phpBB/posting.php | |
| parent | 9f87c497fe25611ddd2f6963ce38b7edad876de3 (diff) | |
| parent | 70f313eb4ff9481b6a3a4a81f1392e37608d4435 (diff) | |
| download | forums-be52ea882ad55af8bd8a59814b11488025fb3563.tar forums-be52ea882ad55af8bd8a59814b11488025fb3563.tar.gz forums-be52ea882ad55af8bd8a59814b11488025fb3563.tar.bz2 forums-be52ea882ad55af8bd8a59814b11488025fb3563.tar.xz forums-be52ea882ad55af8bd8a59814b11488025fb3563.zip | |
Merge pull request #2357 from Nicofuma/ticket/11942
[ticket/11942] Delete post/topic reason should be added to logs
* Nicofuma/ticket/11942:
[ticket/11942] Don't change the reason to '' when hard deleting
[ticket/11942] Don't show the checkbox if the post is already soft-deleted
[ticket/11942] Remove useless IF in templates
[ticket/11942] Apply the modifications to subsilver
[ticket/11942] Always display delete reason
[ticket/11942] Edits messages
[ticket/11942] Change the formulation
[ticket/11942] Adding the reason to hard deleted topic/post
[ticket/11942] Delete post/topic reason should be added to logs
Diffstat (limited to 'phpBB/posting.php')
| -rw-r--r-- | phpBB/posting.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index d3015c6eb6..2516067aae 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1571,7 +1571,6 @@ $page_data = array( 'S_LOCK_POST_ALLOWED' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false, 'S_LOCK_POST_CHECKED' => ($lock_post_checked) ? ' checked="checked"' : '', 'S_SOFTDELETE_CHECKED' => ($mode == 'edit' && $post_data['post_visibility'] == ITEM_DELETED) ? ' checked="checked"' : '', - 'S_DELETE_REASON' => ($mode == 'edit' && $auth->acl_get('m_softdelete', $forum_id)) ? true : false, 'S_SOFTDELETE_ALLOWED' => ($mode == 'edit' && $phpbb_content_visibility->can_soft_delete($forum_id, $post_data['poster_id'], $lock_post_checked)) ? true : false, 'S_RESTORE_ALLOWED' => $auth->acl_get('m_approve', $forum_id), 'S_IS_DELETED' => ($mode == 'edit' && $post_data['post_visibility'] == ITEM_DELETED) ? true : false, @@ -1781,14 +1780,14 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_sof if ($next_post_id === false) { - add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_TOPIC' : 'LOG_DELETE_TOPIC'), $post_data['topic_title'], $post_username); + add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_TOPIC' : 'LOG_DELETE_TOPIC'), $post_data['topic_title'], $post_username, $soft_delete_reason); $meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id"); $message = $user->lang['POST_DELETED']; } else { - add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_POST' : 'LOG_DELETE_POST'), $post_data['post_subject'], $post_username); + add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_POST' : 'LOG_DELETE_POST'), $post_data['post_subject'], $post_username, $soft_delete_reason); $meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=$next_post_id") . "#p$next_post_id"; $message = $user->lang['POST_DELETED']; @@ -1812,14 +1811,12 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_sof $can_delete = $auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_delete', $forum_id)); $can_softdelete = $auth->acl_get('m_softdelete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_softdelete', $forum_id)); - $display_reason = $auth->acl_get('m_softdelete', $forum_id) || ($can_delete && $can_softdelete); $template->assign_vars(array( 'S_SOFTDELETED' => $post_data['post_visibility'] == ITEM_DELETED, 'S_CHECKED_PERMANENT' => $request->is_set_post('delete_permanent') ? ' checked="checked"' : '', 'S_ALLOWED_DELETE' => $can_delete, 'S_ALLOWED_SOFTDELETE' => $can_softdelete, - 'S_DELETE_REASON' => $display_reason, )); $l_confirm = 'DELETE_POST'; |
