mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 23:37:39 +02: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:
@@ -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}
|
||||||
|
Reference in New Issue
Block a user