diff options
| author | Josh Woody <a_jelly_doughnut@phpbb.com> | 2010-06-27 14:22:36 -0500 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2012-08-29 17:50:11 +0200 |
| commit | fb13ab83e476d2afbc7bb181f7ab90df98f996da (patch) | |
| tree | a86bc9db9c4e65efb50857d6ca18633c87a5027c /phpBB/viewtopic.php | |
| parent | c32d76080605f843bb23e9a608c368d4b5dc55d8 (diff) | |
| download | forums-fb13ab83e476d2afbc7bb181f7ab90df98f996da.tar forums-fb13ab83e476d2afbc7bb181f7ab90df98f996da.tar.gz forums-fb13ab83e476d2afbc7bb181f7ab90df98f996da.tar.bz2 forums-fb13ab83e476d2afbc7bb181f7ab90df98f996da.tar.xz forums-fb13ab83e476d2afbc7bb181f7ab90df98f996da.zip | |
[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
Diffstat (limited to 'phpBB/viewtopic.php')
| -rw-r--r-- | phpBB/viewtopic.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index b6c47211f7..e5a7f64cad 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -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, |
