mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
some changes... mainly permission related. Please note the intval($forum_id) at viewtopic, somehow the auth class did not identified it while generating the forum rules.
git-svn-id: file:///svn/phpbb/trunk@3553 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -195,7 +195,7 @@ function gen_forum_rules($mode, &$forum_id)
|
||||
foreach ($rules as $rule)
|
||||
{
|
||||
$template->assign_block_vars('rules', array(
|
||||
'RULE' => ($auth->acl_gets('f_' . $rule, 'm_', 'a_', $forum_id)) ? $user->lang['RULES_' . strtoupper($rule) . '_CAN'] : $user->lang['RULES_' . strtoupper($rule) . '_CANNOT'])
|
||||
'RULE' => ($auth->acl_gets('f_' . $rule, 'm_', 'a_', intval($forum_id))) ? $user->lang['RULES_' . strtoupper($rule) . '_CAN'] : $user->lang['RULES_' . strtoupper($rule) . '_CANNOT'])
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -507,4 +507,43 @@ function generate_smilies($mode)
|
||||
}
|
||||
}
|
||||
|
||||
// Generate Topic Icons
|
||||
function generate_topic_icons($mode, $enable_icons)
|
||||
{
|
||||
global $template, $config;
|
||||
|
||||
if (!$enable_icons)
|
||||
{
|
||||
return (false);
|
||||
}
|
||||
|
||||
$result = false;
|
||||
|
||||
// Grab icons
|
||||
$icons = array();
|
||||
obtain_icons($icons);
|
||||
|
||||
if (sizeof($icons))
|
||||
{
|
||||
$result = true;
|
||||
|
||||
foreach ($icons as $id => $data)
|
||||
{
|
||||
if ($data['display'])
|
||||
{
|
||||
$template->assign_block_vars('topic_icon', array(
|
||||
'ICON_ID' => $id,
|
||||
'ICON_IMG' => $phpbb_root_path . $config['icons_path'] . '/' . $data['img'],
|
||||
'ICON_WIDTH' => $data['width'],
|
||||
'ICON_HEIGHT' => $data['height'],
|
||||
|
||||
'S_ICON_CHECKED' => ($id == $icon_id && $mode != 'reply') ? ' checked="checked"' : '')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ($result);
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user