diff options
author | Erik Frèrejean <erikfrerejean@phpbb.com> | 2011-02-03 14:56:31 +0100 |
---|---|---|
committer | Erik Frèrejean <erikfrerejean@phpbb.com> | 2011-03-04 11:10:09 +0100 |
commit | 1dd25ce62df7650a295cdf017148a89962a538c1 (patch) | |
tree | 00f5275a108a74e2d204c35e53089ad21e11d8ff /phpBB/includes/acp/acp_email.php | |
parent | 1b606133198eb1c37402bafea2e3c2c36b25d197 (diff) | |
download | forums-1dd25ce62df7650a295cdf017148a89962a538c1.tar forums-1dd25ce62df7650a295cdf017148a89962a538c1.tar.gz forums-1dd25ce62df7650a295cdf017148a89962a538c1.tar.bz2 forums-1dd25ce62df7650a295cdf017148a89962a538c1.tar.xz forums-1dd25ce62df7650a295cdf017148a89962a538c1.zip |
[ticket/9581] Make banlist table select optional
Per Nick, only set the `BANLIST_TABLE` in the select statement
if the `$sql_ban_where` variable is set.
PHPBB3-9581
Diffstat (limited to 'phpBB/includes/acp/acp_email.php')
-rw-r--r-- | phpBB/includes/acp/acp_email.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php index d65cce7899..c81a64d2a0 100644 --- a/phpBB/includes/acp/acp_email.php +++ b/phpBB/includes/acp/acp_email.php @@ -85,7 +85,7 @@ class acp_email if ($group_id) { $sql = 'SELECT u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type - FROM ' . BANLIST_TABLE . ' b, ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug + FROM ' . ((!empty($sql_ban_where)) ? BANLIST_TABLE . ' b, ' : '') . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug WHERE ug.group_id = ' . $group_id . ' AND ug.user_pending = 0 AND u.user_id = ug.user_id @@ -97,7 +97,7 @@ class acp_email else { $sql = 'SELECT u.username, u.username_clean, u.user_email, u.user_jabber, u.user_notify_type, u.user_lang - FROM (' . BANLIST_TABLE . ' b, ' . USERS_TABLE . ' u) + FROM (' . ((!empty($sql_ban_where)) ? BANLIST_TABLE . ' b, ' : '') . USERS_TABLE . ' u) WHERE u.user_allow_massemail = 1 AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ") {$sql_ban_where} |