From 6924580e7d33a85471db3bb03e886cf01e64b7a2 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 18 Jan 2010 00:11:20 +0000 Subject: [PATCH] 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 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/ucp/ucp_pm_options.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index ded991fa32..ed177b6d18 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -146,6 +146,7 @@
  • [Change] Show login attempt CAPTCHA option in the captcha plugin module.
  • [Change] It is no longer possible to persist a solution for the login CAPTCHA.
  • [Change] SQLite is no longer autoloaded by the installer. (Bug #56105)
  • +
  • [Change] Friends and foes will not show up as private message rule options if their respective UCP modules are disabled. (Bug #51155)
  • 1.ii. Changes since 3.0.5

    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 .= ''; } }