aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2014-07-16 18:31:12 +0200
committerOliver Schramm <oliver.schramm97@gmail.com>2015-07-19 21:26:47 +0200
commit7d31232846e29311e5b76bf32f41f64da7985a79 (patch)
tree5e84f565cd94d54a854f5ef5006e5dd112b3884e /phpBB/includes/functions_posting.php
parentdf56b2ed364e24f803047c9f64d168432ba2680c (diff)
downloadforums-7d31232846e29311e5b76bf32f41f64da7985a79.tar
forums-7d31232846e29311e5b76bf32f41f64da7985a79.tar.gz
forums-7d31232846e29311e5b76bf32f41f64da7985a79.tar.bz2
forums-7d31232846e29311e5b76bf32f41f64da7985a79.tar.xz
forums-7d31232846e29311e5b76bf32f41f64da7985a79.zip
[ticket/8708] Apply permission 'f_announce_global'
PHPBB3-8708
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 9109c48ab6..e4520d7f03 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -337,18 +337,15 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
$toggle = false;
$topic_types = array(
- 'sticky' => array('const' => POST_STICKY, 'lang' => 'POST_STICKY'),
- 'announce' => array('const' => POST_ANNOUNCE, 'lang' => 'POST_ANNOUNCEMENT'),
- 'global' => array('const' => POST_GLOBAL, 'lang' => 'POST_GLOBAL')
+ 'sticky' => array('const' => POST_STICKY, 'lang' => 'POST_STICKY'),
+ 'announce' => array('const' => POST_ANNOUNCE, 'lang' => 'POST_ANNOUNCEMENT'),
+ 'announce_global' => array('const' => POST_GLOBAL, 'lang' => 'POST_GLOBAL')
);
$topic_type_array = array();
foreach ($topic_types as $auth_key => $topic_value)
{
- // We do not have a special post global announcement permission
- $auth_key = ($auth_key == 'global') ? 'announce' : $auth_key;
-
if ($auth->acl_get('f_' . $auth_key, $forum_id))
{
$toggle = true;
@@ -378,8 +375,8 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
$template->assign_vars(array(
'S_TOPIC_TYPE_STICKY' => ($auth->acl_get('f_sticky', $forum_id)),
- 'S_TOPIC_TYPE_ANNOUNCE' => ($auth->acl_get('f_announce', $forum_id)))
- );
+ 'S_TOPIC_TYPE_ANNOUNCE' => ($auth->acl_gets('f_announce', 'f_announce_global', $forum_id)),
+ ));
}
return $toggle;