mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 08:17:47 +02:00
[ticket/14780] Only use $max_setting in this function
PHPBB3-14780
This commit is contained in:
@@ -2151,7 +2151,7 @@ function phpbb_get_max_setting_from_group(\phpbb\db\driver\driver_interface $db,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get maximum number of allowed recipients
|
// 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
|
FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
|
||||||
WHERE ug.user_id = ' . (int) $user_id . '
|
WHERE ug.user_id = ' . (int) $user_id . '
|
||||||
AND ug.user_pending = 0
|
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);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
$max_setting = (int) $row['max_setting'];
|
$max_setting = (int) $row['max_setting'];
|
||||||
$min_setting = (int) $row['min_setting'];
|
|
||||||
|
|
||||||
return ($min_setting > 0) ? $min_setting : $max_setting;
|
return $max_setting;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user