mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
Friends and foes will not show up as private message rule options if their respective UCP modules are disabled. #51155
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10425 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -637,12 +637,29 @@ function define_action_option($hardcoded, $action_option, $action_lang, $folder)
|
||||
function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
|
||||
{
|
||||
global $template;
|
||||
global $module;
|
||||
|
||||
$exclude = array();
|
||||
|
||||
if (!$module->loaded('zebra', 'friends'))
|
||||
{
|
||||
$exclude[RULE_IS_FRIEND] = true;
|
||||
}
|
||||
|
||||
if (!$module->loaded('zebra', 'foes'))
|
||||
{
|
||||
$exclude[RULE_IS_FOE] = true;
|
||||
}
|
||||
|
||||
$s_rule_options = '';
|
||||
if (!$hardcoded)
|
||||
{
|
||||
foreach ($check_ary as $value => $_check)
|
||||
{
|
||||
if (isset($exclude[$value]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$s_rule_options .= '<option value="' . $value . '"' . (($value == $rule_option) ? ' selected="selected"' : '') . '>' . $rule_lang[$value] . '</option>';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user