aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-10-05 14:42:11 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-10-05 14:42:11 +0200
commit05f236675528b5af68ba5f0ff140eb8c51ab92b1 (patch)
tree6d321d51696172550261047d4d673fb77d9cc68d /phpBB/includes
parent526721c7db9ddc8fc39fd84409042deb470a1736 (diff)
downloadforums-05f236675528b5af68ba5f0ff140eb8c51ab92b1.tar
forums-05f236675528b5af68ba5f0ff140eb8c51ab92b1.tar.gz
forums-05f236675528b5af68ba5f0ff140eb8c51ab92b1.tar.bz2
forums-05f236675528b5af68ba5f0ff140eb8c51ab92b1.tar.xz
forums-05f236675528b5af68ba5f0ff140eb8c51ab92b1.zip
[feature/soft-delete] Update docs of can_soft_delete and remove can_restore
PHPBB3-9567
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/content_visibility.php28
1 files changed, 4 insertions, 24 deletions
diff --git a/phpBB/includes/content_visibility.php b/phpBB/includes/content_visibility.php
index a0bb3e9fd4..f2915a5143 100644
--- a/phpBB/includes/content_visibility.php
+++ b/phpBB/includes/content_visibility.php
@@ -293,9 +293,10 @@ class phpbb_content_visibility
/**
* Can the current logged-in user soft-delete posts?
- * @param $forum_id - int - the forum ID whose permissions to check
- * @param $poster_id - int - the poster ID of the post in question
- * @param $post_locked - bool - is the post locked?
+ *
+ * @param $forum_id int Forum ID whose permissions to check
+ * @param $poster_id int Poster ID of the post in question
+ * @param $post_locked bool Is the post locked?
* @return bool
*/
static function can_soft_delete($forum_id, $poster_id, $post_locked)
@@ -310,28 +311,7 @@ class phpbb_content_visibility
{
return true;
}
- return false;
- }
- /**
- * Can the current logged-in user restore soft-deleted posts?
- * @param $forum_id - int - the forum ID whose permissions to check
- * @param $poster_id - int - the poster ID of the post in question
- * @param $post_locked - bool - is the post locked?
- * @return bool
- */
- public function can_restore($forum_id, $poster_id, $post_locked)
- {
- global $auth, $user;
-
- if ($auth->acl_get('m_restore', $forum_id))
- {
- return true;
- }
- else if ($auth->acl_get('f_restore', $forum_id) && $poster_id == $user->data['user_id'] && !$post_locked)
- {
- return true;
- }
return false;
}