aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-09-05 15:45:50 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-09-05 15:45:50 +0000
commite593bcf3d7ff2636b9e0ea578cbd7b795e135a38 (patch)
tree86e5fef9d7f2b7fd3f184c5dbdd6f8b8e521010c /phpBB/includes/functions.php
parent76f9c1bdad31500ac0e87c7b8560352f39b0857a (diff)
downloadforums-e593bcf3d7ff2636b9e0ea578cbd7b795e135a38.tar
forums-e593bcf3d7ff2636b9e0ea578cbd7b795e135a38.tar.gz
forums-e593bcf3d7ff2636b9e0ea578cbd7b795e135a38.tar.bz2
forums-e593bcf3d7ff2636b9e0ea578cbd7b795e135a38.tar.xz
forums-e593bcf3d7ff2636b9e0ea578cbd7b795e135a38.zip
- re-enable polls (user is now able to decide if users are able to change votes if this feature is enabled within the given forum)
git-svn-id: file:///svn/phpbb/trunk@4981 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 939de4b1ab..461a700c89 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -265,17 +265,21 @@ function get_moderators(&$forum_moderators, $forum_id = false)
}
// User authorisation levels output
-function gen_forum_auth_level($mode, &$forum_id)
+function gen_forum_auth_level($mode, $forum_id)
{
global $SID, $template, $auth, $user;
- $rules = array('post', 'reply', 'edit', 'delete', 'attach');
+ $rules = array(
+ ($auth->acl_get('f_post', $forum_id)) ? $user->lang['RULES_POST_CAN'] : $user->lang['RULES_POST_CANNOT'],
+ ($auth->acl_get('f_reply', $forum_id)) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'],
+ ($auth->acl_gets('f_edit', 'm_edit', $forum_id)) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'],
+ ($auth->acl_gets('f_delete', 'm_delete', $forum_id)) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
+ ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach', $forum_id)) ? $user->lang['RULES_ATTACH_CAN'] : $user->lang['RULES_ATTACH_CANNOT']
+ );
foreach ($rules as $rule)
{
- $template->assign_block_vars('rules', array(
- 'RULE' => ($auth->acl_get('f_' . $rule, intval($forum_id))) ? $user->lang['RULES_' . strtoupper($rule) . '_CAN'] : $user->lang['RULES_' . strtoupper($rule) . '_CANNOT'])
- );
+ $template->assign_block_vars('rules', array('RULE' => $rule));
}
return;