1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[feature/soft-delete] Implement the ability to soft-delete and restore posts

The soft delete feature seems to work.  Tests are pending.  A real icon is pending.  Add the permissions and the interface to soft-delete posts.  Also able to restore posts via the MCP queue

PHPBB3-9657
This commit is contained in:
Josh Woody
2010-06-27 14:22:36 -05:00
committed by Joas Schilling
parent c32d760806
commit fb13ab83e4
20 changed files with 553 additions and 197 deletions

View File

@@ -277,7 +277,7 @@ if ($post_id)
$sql = 'SELECT COUNT(p.post_id) AS prev_posts
FROM ' . POSTS_TABLE . " p
WHERE p.topic_id = {$topic_data['topic_id']}
" . phpbb_visibility::get_visibility_sql('post', $forum_id, 'p');
" . phpbb_visibility::get_visibility_sql('post', $forum_id, 'p.');
if ($sort_dir == 'd')
{
@@ -615,6 +615,7 @@ $template->assign_vars(array(
'REPLY_IMG' => ($topic_data['forum_status'] == ITEM_LOCKED || $topic_data['topic_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', 'TOPIC_LOCKED') : $user->img('button_topic_reply', 'REPLY_TO_TOPIC'),
'EDIT_IMG' => $user->img('icon_post_edit', 'EDIT_POST'),
'DELETE_IMG' => $user->img('icon_post_delete', 'DELETE_POST'),
'DELETED_IMG' => $user->img('icon_topic_deleted', 'POST_DELETED_RESTORE'),
'INFO_IMG' => $user->img('icon_post_info', 'VIEW_INFO'),
'PROFILE_IMG' => $user->img('icon_user_profile', 'READ_PROFILE'),
'SEARCH_IMG' => $user->img('icon_user_search', 'SEARCH_USER_POSTS'),
@@ -1611,7 +1612,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
'S_MULTIPLE_ATTACHMENTS' => !empty($attachments[$row['post_id']]) && sizeof($attachments[$row['post_id']]) > 1,
'S_POST_UNAPPROVED' => ($row['post_visibility'] == ITEM_APPROVED) ? false : true,
'S_POST_UNAPPROVED' => ($row['post_visibility'] == ITEM_UNAPPROVED) ? true : false,
'S_POST_DELETED' => ($row['post_visibility'] == ITEM_DELETED) ? true : false,
'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_report', $forum_id)) ? true : false,
'S_DISPLAY_NOTICE' => $display_notice && $row['post_attachment'],
'S_FRIEND' => ($row['friend']) ? true : false,