diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index e157a2bd0f..d4e7fecbff 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1657,7 +1657,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u if ($user->data['user_id'] != $poster_id) { $log_subject = ($subject) ? $subject : $data['topic_title']; - add_log('mod', $data['forum_id'], $data['topic_id'], 'LOG_POST_EDITED', $log_subject, (!empty($username)) ? $username : $user->lang['GUEST']); + add_log('mod', $data['forum_id'], $data['topic_id'], 'LOG_POST_EDITED', $log_subject, (!empty($username)) ? $username : $user->lang['GUEST'], $data['post_edit_reason']); } if (!isset($sql_data[POSTS_TABLE]['sql'])) 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'; diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index ace8522ec8..838a73caed 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -548,9 +548,9 @@ $lang = array_merge($lang, array( 'LOG_APPROVE_TOPIC' => 'Approved topic
» %s', 'LOG_BUMP_TOPIC' => 'User bumped topic
» %s', - 'LOG_DELETE_POST' => 'Deleted post “%1$s” written by
» %2$s', + 'LOG_DELETE_POST' => 'Deleted post “%1$s” written by “%2$s” for the following reason
» %3$s', 'LOG_DELETE_SHADOW_TOPIC' => 'Deleted shadow topic
» %s', - 'LOG_DELETE_TOPIC' => 'Deleted topic “%1$s” written by
» %2$s', + 'LOG_DELETE_TOPIC' => 'Deleted topic “%1$s” written by “%2$s” for the following reason
» %3$s', 'LOG_FORK' => 'Copied topic
» from %s', 'LOG_LOCK' => 'Locked topic
» %s', 'LOG_LOCK_POST' => 'Locked post
» %s', @@ -560,13 +560,13 @@ $lang = array_merge($lang, array( 'LOG_PM_REPORT_DELETED' => 'Deleted PM report
» %s', 'LOG_POST_APPROVED' => 'Approved post
» %s', 'LOG_POST_DISAPPROVED' => 'Disapproved post “%1$s” written by “%3$s” for the following reason
» %2$s', - 'LOG_POST_EDITED' => 'Edited post “%1$s” written by
» %2$s', + 'LOG_POST_EDITED' => 'Edited post “%1$s” written by “%2$s” for the following reason
» %3$s', 'LOG_POST_RESTORED' => 'Restored post
» %s', 'LOG_REPORT_CLOSED' => 'Closed report
» %s', 'LOG_REPORT_DELETED' => 'Deleted report
» %s', 'LOG_RESTORE_TOPIC' => 'Restored topic “%1$s” written by
» %2$s', - 'LOG_SOFTDELETE_POST' => 'Soft deleted post “%1$s” written by
» %2$s', - 'LOG_SOFTDELETE_TOPIC' => 'Soft deleted topic “%1$s” written by
» %2$s', + 'LOG_SOFTDELETE_POST' => 'Soft deleted post “%1$s” written by “%2$s” for the following reason
» %3$s', + 'LOG_SOFTDELETE_TOPIC' => 'Soft deleted topic “%1$s” written by “%2$s” for the following reason
» %3$s', 'LOG_SPLIT_DESTINATION' => 'Moved split posts
» to %s', 'LOG_SPLIT_SOURCE' => 'Split posts
» from %s', 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'; diff --git a/phpBB/styles/prosilver/template/confirm_delete_body.html b/phpBB/styles/prosilver/template/confirm_delete_body.html index 2d4dde5cd5..f164b5f357 100644 --- a/phpBB/styles/prosilver/template/confirm_delete_body.html +++ b/phpBB/styles/prosilver/template/confirm_delete_body.html @@ -2,23 +2,19 @@

{MESSAGE_TEXT}

- - - - - - - - + + + +
  @@ -37,9 +33,8 @@

{MESSAGE_TEXT}

-
- +
@@ -51,14 +46,11 @@
- -
-

{L_DELETE_REASON_EXPLAIN}
-
-
- +
+

{L_DELETE_REASON_EXPLAIN}
+
+
-
{S_HIDDEN_FIELDS} diff --git a/phpBB/styles/subsilver2/template/confirm_delete_body.html b/phpBB/styles/subsilver2/template/confirm_delete_body.html index 9e416f5195..18df397fc3 100644 --- a/phpBB/styles/subsilver2/template/confirm_delete_body.html +++ b/phpBB/styles/subsilver2/template/confirm_delete_body.html @@ -14,26 +14,23 @@

{MESSAGE_TEXT}


- - - - - - - - - - - - - - -
{L_DELETE_PERMANENTLY}{L_COLON} - - {L_DELETE_TOPIC_PERMANENTLY}{L_DELETE_POST_PERMANENTLY} -
{L_DELETE_REASON}{L_COLON}
{L_DELETE_REASON_EXPLAIN}
-
+ + + + + + + + + + +
{L_DELETE_PERMANENTLY}{L_COLON} + + {L_DELETE_TOPIC_PERMANENTLY}{L_DELETE_POST_PERMANENTLY} +
{L_DELETE_REASON}{L_COLON}
{L_DELETE_REASON_EXPLAIN}
+
+ {S_HIDDEN_FIELDS}