1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-02 23:12:46 +02:00

Merge branch '3.2.x'

This commit is contained in:
Marc Alexander 2017-01-04 21:07:36 +01:00
commit ee3cf0af0f
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
2 changed files with 4 additions and 5 deletions

View File

@ -2158,7 +2158,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
@ -2167,9 +2167,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) ? $max_setting : 0;
return $max_setting;
}
/**

View File

@ -33,12 +33,12 @@ class phpbb_functions_privmsgs_get_max_setting_from_group_test extends phpbb_dat
static public function get_max_setting_from_group_data()
{
return array(
array(1, 0, 'message_limit'),
array(1, 2, 'message_limit'),
array(2, 2, 'message_limit'),
array(3, 0, 'message_limit'),
array(4, 0, 'message_limit'),
array(5, 2, 'message_limit'),
array(1, 0, 'max_recipients'),
array(1, 4, 'max_recipients'),
array(2, 4, 'max_recipients'),
array(3, 0, 'max_recipients'),
array(4, 5, 'max_recipients'),