diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-01-25 00:33:26 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-02-08 21:16:04 +0100 |
commit | 291143fe6a821a07f8097e26e38f69efa3c84848 (patch) | |
tree | 40b549ad219ea52e62974f60dd3fe91ea1675c14 /phpBB/includes/ucp | |
parent | b0c910e49c31e086f19f983bb9d7d5051d34fac8 (diff) | |
download | forums-291143fe6a821a07f8097e26e38f69efa3c84848.tar forums-291143fe6a821a07f8097e26e38f69efa3c84848.tar.gz forums-291143fe6a821a07f8097e26e38f69efa3c84848.tar.bz2 forums-291143fe6a821a07f8097e26e38f69efa3c84848.tar.xz forums-291143fe6a821a07f8097e26e38f69efa3c84848.zip |
[ticket/9109] Properly document and calculate the group settings with value 0
PHPBB3-9109
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 0064fb89fc..8c69346f03 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -504,15 +504,9 @@ function compose_pm($id, $mode, $action, $user_folders = array()) } // Get maximum number of allowed recipients - $sql = 'SELECT MAX(g.group_max_recipients) as max_recipients - FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug - WHERE ug.user_id = ' . $user->data['user_id'] . ' - AND ug.user_pending = 0 - AND ug.group_id = g.group_id'; - $result = $db->sql_query($sql); - $max_recipients = (int) $db->sql_fetchfield('max_recipients'); - $db->sql_freeresult($result); + $max_recipients = phpbb_get_max_setting_from_group($db, $user->data['user_id'], 'max_recipients'); + // If it is 0, there is no limit set and we use the maximum value within the config. $max_recipients = (!$max_recipients) ? $config['pm_max_recipients'] : $max_recipients; // If this is a quote/reply "to all"... we may increase the max_recpients to the number of original recipients |