From 36983da764695bb516645a176156bbc8187ef41a Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 13 Oct 2008 18:45:24 +0000 Subject: Disable mass e-mail when e-mail is disabled. #27385 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9011 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/acp/info/acp_email.php | 2 +- phpBB/install/database_update.php | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index ef148704b4..e65c4142a4 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -143,6 +143,7 @@
  • [Fix] Correctly convert Neil's Birthday MOD to the date format used in phpBB3. (Bug #32895)
  • [Fix] Parse BBCode lists of type square, circle and disc. (Bug #35295)
  • [Fix] Round the displayed percentages in polls. (Bug #32375)
  • +
  • [Fix] Disable mass e-mail when e-mail is disabled. (Bug #27385)
  • [Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.
  • [Change] Display warning in ACP if config.php file is left writable.
  • diff --git a/phpBB/includes/acp/info/acp_email.php b/phpBB/includes/acp/info/acp_email.php index f2270892e0..4ad7bca58b 100644 --- a/phpBB/includes/acp/info/acp_email.php +++ b/phpBB/includes/acp/info/acp_email.php @@ -20,7 +20,7 @@ class acp_email_info 'title' => 'ACP_MASS_EMAIL', 'version' => '1.0.0', 'modes' => array( - 'email' => array('title' => 'ACP_MASS_EMAIL', 'auth' => 'acl_a_email', 'cat' => array('ACP_GENERAL_TASKS')), + 'email' => array('title' => 'ACP_MASS_EMAIL', 'auth' => 'acl_a_email && cfg_email_enable', 'cat' => array('ACP_GENERAL_TASKS')), ), ); } diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 3e733e6b22..aba05722a1 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -1927,6 +1927,12 @@ function change_database_data(&$no_updates, $version) while ($start); */ + $sql = 'UPDATE ' . MODULES_TABLE . ' + SET module_auth = \'acl_a_email && cfg_email_enable\' + WHERE module_class = \'acp\' + AND module_basename = \'email\''; + _sql($sql, $errored, $error_ary); + $no_updates = false; break; } -- cgit v1.2.1