aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_pm_options.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2010-01-18 00:11:20 +0000
committerChris Smith <toonarmy@phpbb.com>2010-01-18 00:11:20 +0000
commit6924580e7d33a85471db3bb03e886cf01e64b7a2 (patch)
tree08aa59b890be6785c50aeb5ffb97a510e5048d1d /phpBB/includes/ucp/ucp_pm_options.php
parent53a51744c03953039fbc47df84a52dc55e9474ec (diff)
downloadforums-6924580e7d33a85471db3bb03e886cf01e64b7a2.tar
forums-6924580e7d33a85471db3bb03e886cf01e64b7a2.tar.gz
forums-6924580e7d33a85471db3bb03e886cf01e64b7a2.tar.bz2
forums-6924580e7d33a85471db3bb03e886cf01e64b7a2.tar.xz
forums-6924580e7d33a85471db3bb03e886cf01e64b7a2.zip
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
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm_options.php')
-rw-r--r--phpBB/includes/ucp/ucp_pm_options.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php
index e80c0672cf..58c2d087c8 100644
--- a/phpBB/includes/ucp/ucp_pm_options.php
+++ b/phpBB/includes/ucp/ucp_pm_options.php
@@ -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>';
}
}