diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2012-12-18 15:08:05 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-12-18 15:08:05 +0100 |
commit | 63f3cd45bb30354b4707b542e54e7dad0f99e15c (patch) | |
tree | 8b2febd06fc47a85af6e9208944b14b255aa9b37 /phpBB | |
parent | 4300d06a172fd7950405dc23077b57354452d9b1 (diff) | |
download | forums-63f3cd45bb30354b4707b542e54e7dad0f99e15c.tar forums-63f3cd45bb30354b4707b542e54e7dad0f99e15c.tar.gz forums-63f3cd45bb30354b4707b542e54e7dad0f99e15c.tar.bz2 forums-63f3cd45bb30354b4707b542e54e7dad0f99e15c.tar.xz forums-63f3cd45bb30354b4707b542e54e7dad0f99e15c.zip |
[feature/soft-delete] Add delete information to approve deatils page
PHPBB3-9657
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 31 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/mcp_post.html | 7 |
2 files changed, 38 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index e56aa17ee8..4180b5b08f 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -205,6 +205,33 @@ class mcp_queue } } + // Deleting information + if ($post_info['post_visibility'] == ITEM_DELETED && $post_info['post_delete_user']) + { + // User having deleted the post also being the post author? + if (!$post_info['post_delete_user'] || $post_info['post_delete_user'] == $post_info['poster_id']) + { + $display_username = get_username_string('full', $post_info['poster_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']); + } + else + { + $sql = 'SELECT u.user_id, u.username, u.user_colour + FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u + WHERE p.post_id = ' . $post_info['post_id'] . ' + AND p.post_delete_user = u.user_id'; + $result = $db->sql_query($sql); + $post_delete_userinfo = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + $display_username = get_username_string('full', $post_info['post_delete_user'], $post_delete_userinfo['username'], $post_delete_userinfo['user_colour']); + } + + $l_deleted_by = $user->lang('DELETED_INFORMATION', $display_username, $user->format_date($post_info['post_delete_time'], false, true)); + } + else + { + $l_deleted_by = ''; + } + $post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']); $topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']); @@ -216,6 +243,9 @@ class mcp_queue 'S_POST_UNAPPROVED' => ($post_info['post_visibility'] == ITEM_UNAPPROVED), 'S_POST_LOCKED' => $post_info['post_edit_locked'], 'S_USER_NOTES' => true, + 'S_POST_DELETED' => ($post_info['post_visibility'] == ITEM_DELETED), + 'DELETED_MESSAGE' => $l_deleted_by, + 'DELETE_REASON' => $post_info['post_delete_reason'], 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '', 'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), @@ -227,6 +257,7 @@ class mcp_queue 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'), + 'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue' . (($topic_id) ? '&mode=unapproved_topics' : '&mode=unapproved_posts')) . "&start=$start\">", '</a>'), 'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>'), 'RETURN_TOPIC_SIMPLE' => sprintf($user->lang['RETURN_TOPIC_SIMPLE'], '<a href="' . $topic_url . '">', '</a>'), diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html index 756a6eb114..6f53f5024e 100644 --- a/phpBB/styles/prosilver/template/mcp_post.html +++ b/phpBB/styles/prosilver/template/mcp_post.html @@ -100,6 +100,13 @@ </dl> <!-- ENDIF --> + <!-- IF DELETED_MESSAGE or DELETE_REASON --> + <div class="notice"> + {DELETED_MESSAGE} + <!-- IF DELETE_REASON --><br /><strong>{L_REASON}:</strong> <em>{DELETE_REASON}</em><!-- ENDIF --> + </div> + <!-- ENDIF --> + <!-- IF SIGNATURE --> <div id="sig{POST_ID}" class="signature">{SIGNATURE}</div> <!-- ENDIF --> |