mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
[ticket/14780] Only use $max_setting in this function
PHPBB3-14780
This commit is contained in:
parent
53ead1e926
commit
29b1b95226
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue