mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
[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
This commit is contained in:
parent
1b60613319
commit
1dd25ce62d
1 changed files with 2 additions and 2 deletions
|
@ -85,7 +85,7 @@ class acp_email
|
||||||
if ($group_id)
|
if ($group_id)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type
|
$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 . '
|
WHERE ug.group_id = ' . $group_id . '
|
||||||
AND ug.user_pending = 0
|
AND ug.user_pending = 0
|
||||||
AND u.user_id = ug.user_id
|
AND u.user_id = ug.user_id
|
||||||
|
@ -97,7 +97,7 @@ class acp_email
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = 'SELECT u.username, u.username_clean, u.user_email, u.user_jabber, u.user_notify_type, u.user_lang
|
$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
|
WHERE u.user_allow_massemail = 1
|
||||||
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ")
|
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ")
|
||||||
{$sql_ban_where}
|
{$sql_ban_where}
|
||||||
|
|
Loading…
Add table
Reference in a new issue