diff options
| author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-07-22 11:30:50 +0200 |
|---|---|---|
| committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-07-22 11:30:50 +0200 |
| commit | e1cbe735380d98f2b87f4243317fd55cbc0439af (patch) | |
| tree | f7047bc58b88f666051ee4eafe001ce898763672 /phpBB/includes/functions_posting.php | |
| parent | 8bfbd7782815aeee6ada6fa8a495b780fc21cb3d (diff) | |
| parent | 7d31232846e29311e5b76bf32f41f64da7985a79 (diff) | |
| download | forums-e1cbe735380d98f2b87f4243317fd55cbc0439af.tar forums-e1cbe735380d98f2b87f4243317fd55cbc0439af.tar.gz forums-e1cbe735380d98f2b87f4243317fd55cbc0439af.tar.bz2 forums-e1cbe735380d98f2b87f4243317fd55cbc0439af.tar.xz forums-e1cbe735380d98f2b87f4243317fd55cbc0439af.zip | |
Merge pull request #3781 from Elsensee/ticket/8708-2
[ticket/8708] Add extra permission for posting global announcements
* Elsensee/ticket/8708-2:
[ticket/8708] Apply permission 'f_announce_global'
[ticket/8708] Add f_announce_global permission
Diffstat (limited to 'phpBB/includes/functions_posting.php')
| -rw-r--r-- | phpBB/includes/functions_posting.php | 13 |
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; |
