diff options
author | Crizzo <mail@crizzo.de> | 2016-09-15 22:44:34 +0200 |
---|---|---|
committer | Crizzo <mail@crizzo.de> | 2016-09-15 22:44:34 +0200 |
commit | 29b1b95226574bc2b47723d9445ad2ac7a437e99 (patch) | |
tree | e42f2a82fbd766a71285af52c45fc98892236c29 /phpBB/includes | |
parent | 53ead1e926de81c9437767c067d01f6e6ebe68b0 (diff) | |
download | forums-29b1b95226574bc2b47723d9445ad2ac7a437e99.tar forums-29b1b95226574bc2b47723d9445ad2ac7a437e99.tar.gz forums-29b1b95226574bc2b47723d9445ad2ac7a437e99.tar.bz2 forums-29b1b95226574bc2b47723d9445ad2ac7a437e99.tar.xz forums-29b1b95226574bc2b47723d9445ad2ac7a437e99.zip |
[ticket/14780] Only use $max_setting in this function
PHPBB3-14780
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index a614bd0cca..412e911bc0 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -2151,7 +2151,7 @@ function phpbb_get_max_setting_from_group(\phpbb\db\driver\driver_interface $db, } // Get maximum number of allowed recipients - $sql = 'SELECT MIN(g.group_' . $setting . ') as min_setting, MAX(g.group_' . $setting . ') as max_setting + $sql = 'SELECT MAX(g.group_' . $setting . ') as max_setting FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug WHERE ug.user_id = ' . (int) $user_id . ' AND ug.user_pending = 0 @@ -2160,9 +2160,8 @@ function phpbb_get_max_setting_from_group(\phpbb\db\driver\driver_interface $db, $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $max_setting = (int) $row['max_setting']; - $min_setting = (int) $row['min_setting']; - return ($min_setting > 0) ? $min_setting : $max_setting; + return $max_setting; } /** |