aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/message
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-04-13 22:37:49 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-05-29 02:14:30 +0200
commitaf024ea3e503a07f4ca0635d186866fa7c5b795f (patch)
tree32f1de7ee87efd2c6647460373381996187468ff /phpBB/phpbb/message
parentea9756917e7d7e437f0e8076b237c882dcd26a88 (diff)
downloadforums-af024ea3e503a07f4ca0635d186866fa7c5b795f.tar
forums-af024ea3e503a07f4ca0635d186866fa7c5b795f.tar.gz
forums-af024ea3e503a07f4ca0635d186866fa7c5b795f.tar.bz2
forums-af024ea3e503a07f4ca0635d186866fa7c5b795f.tar.xz
forums-af024ea3e503a07f4ca0635d186866fa7c5b795f.zip
[ticket/10073] Global announcements have a forum_id now
PHPBB3-10073
Diffstat (limited to 'phpBB/phpbb/message')
-rw-r--r--phpBB/phpbb/message/topic_form.php29
1 files changed, 5 insertions, 24 deletions
diff --git a/phpBB/phpbb/message/topic_form.php b/phpBB/phpbb/message/topic_form.php
index d691c1e45f..5a5d090017 100644
--- a/phpBB/phpbb/message/topic_form.php
+++ b/phpBB/phpbb/message/topic_form.php
@@ -48,33 +48,14 @@ class topic_form extends form
return 'NO_TOPIC';
}
- /**
- * @todo remove else case when global topics have forum id
- */
- if ($this->topic_row['forum_id'])
+ if (!$this->auth->acl_get('f_read', $this->topic_row['forum_id']))
{
- if (!$this->auth->acl_get('f_read', $this->topic_row['forum_id']))
- {
- return 'SORRY_AUTH_READ';
- }
-
- if (!$this->auth->acl_get('f_email', $this->topic_row['forum_id']))
- {
- return 'NO_EMAIL';
- }
+ return 'SORRY_AUTH_READ';
}
- else
+
+ if (!$this->auth->acl_get('f_email', $this->topic_row['forum_id']))
{
- // If global announcement, we need to check if the user is able to at least read and email in one forum...
- if (!$this->auth->acl_getf_global('f_read'))
- {
- return 'SORRY_AUTH_READ';
- }
-
- if (!$this->auth->acl_getf_global('f_email'))
- {
- return 'NO_EMAIL';
- }
+ return 'NO_EMAIL';
}
return false;