mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
ee3cf0af0f
2 changed files with 4 additions and 5 deletions
|
@ -2158,7 +2158,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
|
||||||
|
@ -2167,9 +2167,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) ? $max_setting : 0;
|
return $max_setting;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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()
|
static public function get_max_setting_from_group_data()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array(1, 0, 'message_limit'),
|
array(1, 2, 'message_limit'),
|
||||||
array(2, 2, 'message_limit'),
|
array(2, 2, 'message_limit'),
|
||||||
array(3, 0, 'message_limit'),
|
array(3, 0, 'message_limit'),
|
||||||
array(4, 0, 'message_limit'),
|
array(4, 0, 'message_limit'),
|
||||||
array(5, 2, 'message_limit'),
|
array(5, 2, 'message_limit'),
|
||||||
array(1, 0, 'max_recipients'),
|
array(1, 4, 'max_recipients'),
|
||||||
array(2, 4, 'max_recipients'),
|
array(2, 4, 'max_recipients'),
|
||||||
array(3, 0, 'max_recipients'),
|
array(3, 0, 'max_recipients'),
|
||||||
array(4, 5, 'max_recipients'),
|
array(4, 5, 'max_recipients'),
|
||||||
|
|
Loading…
Add table
Reference in a new issue