diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index a20ce10aa6..cbf0ff0089 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -470,7 +470,7 @@ class mcp_queue function restore_post($post_id_list, $id, $mode) { global $db, $template, $user, $config; - global $phpEx, $phpbb_root_path; + global $phpEx, $phpbb_root_path, $request; if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_restore'))) { @@ -483,7 +483,7 @@ function restore_post($post_id_list, $id, $mode) $post_info = get_post_data($post_id_list, 'm_restore'); - phpbb_content_visibility::unhide_posts_topics('restore', $post_info, $post_id_list); + $success_msg = phpbb_content_visibility::unhide_posts_topics('restore', $post_info, $post_id_list); if (!$success_msg) { @@ -500,7 +500,20 @@ function restore_post($post_id_list, $id, $mode) $add_message = '

' . sprintf($user->lang['RETURN_POST'], '', ''); } - trigger_error($user->lang[$success_msg] . '

' . sprintf($user->lang['RETURN_PAGE'], "", '') . $add_message); + $message = $user->lang[$success_msg] . '

' . sprintf($user->lang['RETURN_PAGE'], "", '') . $add_message; + + if ($request->is_ajax()) + { + $json_response = new phpbb_json_response; + $json_response->send(array( + 'MESSAGE_TITLE' => $user->lang['INFORMATION'], + 'MESSAGE_TEXT' => $message, + 'REFRESH_DATA' => null, + 'visible' => true, + )); + } + + trigger_error($message); } } @@ -659,7 +672,7 @@ function approve_post($post_id_list, $id, $mode) 'MESSAGE_TITLE' => $user->lang['INFORMATION'], 'MESSAGE_TEXT' => $message, 'REFRESH_DATA' => null, - 'approved' => true + 'visible' => true, )); } @@ -931,7 +944,7 @@ function disapprove_post($post_id_list, $id, $mode) 'MESSAGE_TITLE' => $user->lang['INFORMATION'], 'MESSAGE_TEXT' => $message, 'REFRESH_DATA' => null, - 'approved' => false + 'visible' => false, )); } diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index e6022e3b79..857b9004ec 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -475,6 +475,7 @@ $lang = array_merge($lang, array( 'POST_BY_AUTHOR' => 'by', 'POST_BY_FOE' => 'This post was made by %1$s who is currently on your ignore list. %2$sDisplay this post%3$s.', 'POST_DAY' => '%.2f posts per day', + 'POST_DELETED' => 'Soft deleted post:', 'POST_DETAILS' => 'Post details', 'POST_NEW_TOPIC' => 'Post new topic', 'POST_PCT' => '%.2f%% of all posts', diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index 175fa72829..95d09028ce 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -201,8 +201,8 @@ $lang = array_merge($lang, array( 'MCP_QUEUE_UNAPPROVED_POSTS_EXPLAIN' => 'This is a list of all posts which require approving before they will be visible to users.', 'MCP_QUEUE_UNAPPROVED_TOPICS' => 'Topics awaiting approval', 'MCP_QUEUE_UNAPPROVED_TOPICS_EXPLAIN' => 'This is a list of all topics which require approving before they will be visible to users.', - 'MCP_QUEUE_DELETED_POSTS' => 'Deleted posts', - 'MCP_QUEUE_DELETED_POSTS_EXPLAIN' => 'This is a list of all posts which have been soft deleted. You can restore or permanently delete the posts from this screen.', + 'MCP_QUEUE_DELETED_POSTS' => 'Deleted posts', + 'MCP_QUEUE_DELETED_POSTS_EXPLAIN' => 'This is a list of all posts which have been soft deleted. You can restore or permanently delete the posts from this screen.', 'MCP_VIEW_USER' => 'View warnings for a specific user', diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 54f34e4204..b473e608dc 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -24,8 +24,8 @@ phpbb.add_ajax_callback('post_delete', function() { }); // This callback removes the approve / disapprove div or link. -phpbb.add_ajax_callback('post_approve', function(res) { - var remove = (res.approved) ? $(this) : $(this).parents('.post'); +phpbb.add_ajax_callback('post_visibility', function(res) { + var remove = (res.visible) ? $(this) : $(this).parents('.post'); $(remove).css('pointer-events', 'none').fadeOut(function() { $(this).remove(); }); diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 6f0dbfc1eb..ddcca7e9aa 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -139,7 +139,7 @@

{postrow.MINI_POST_IMG}{postrow.MINI_POST_IMG}{L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} » {postrow.POST_DATE}

-
+

{UNAPPROVED_IMG} {L_POST_UNAPPROVED} @@ -147,8 +147,15 @@ {S_FORM_TOKEN} -
- {DELETED_IMG} {L_POST_DELETED_RESTORE}
+
+ + {DELETED_IMG} {L_POST_DELETED} + + + + {S_FORM_TOKEN} +
+ {REPORTED_IMG} {L_POST_REPORTED}