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/includes/mcp/mcp_main.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/includes/mcp/mcp_main.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index c504da0aeb..9d1afb7dc5 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -123,7 +123,7 @@ class mcp_main trigger_error('NO_TOPIC_SELECTED'); } - mcp_delete_topic($topic_ids, $soft_delete, ($soft_delete) ? $request->variable('delete_reason', '', true) : ''); + mcp_delete_topic($topic_ids, $soft_delete, $request->variable('delete_reason', '', true)); break; case 'delete_post': @@ -140,7 +140,7 @@ class mcp_main trigger_error('NO_POST_SELECTED'); } - mcp_delete_post($post_ids, $soft_delete, ($soft_delete) ? $request->variable('delete_reason', '', true) : ''); + mcp_delete_post($post_ids, $soft_delete, $request->variable('delete_reason', '', true)); break; case 'restore_topic': @@ -787,12 +787,12 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = '' $return = $phpbb_content_visibility->set_topic_visibility(ITEM_DELETED, $topic_id, $row['forum_id'], $user->data['user_id'], time(), $soft_delete_reason); if (!empty($return)) { - add_log('mod', $row['forum_id'], $topic_id, 'LOG_SOFTDELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']); + add_log('mod', $row['forum_id'], $topic_id, 'LOG_SOFTDELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name'], $soft_delete_reason); } } else { - add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']); + add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name'], $soft_delete_reason); } } } @@ -826,7 +826,6 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = '' 'S_TOPIC_MODE' => true, 'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id), 'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id), - 'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id), )); $l_confirm = (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS'; @@ -947,7 +946,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '', foreach ($approve_log as $row) { $post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username']; - add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_SOFTDELETE_POST', $row['post_subject'], $post_username); + add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_SOFTDELETE_POST', $row['post_subject'], $post_username, $soft_delete_reason); } $topic_id = $request->variable('t', 0); @@ -990,7 +989,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '', foreach ($post_data as $id => $row) { $post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username']; - add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject'], $post_username); + add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject'], $post_username, $soft_delete_reason); } // Now delete the posts, topics and forums are automatically resync'ed @@ -1063,7 +1062,6 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '', 'S_SOFTDELETED' => $only_softdeleted, 'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id), 'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id), - 'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id), )); $l_confirm = (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS'; |