aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_pm_compose.php
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-05-29 16:04:56 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-05-29 16:04:56 +0200
commit2aecb9406811cfa6fa9a6de1094479d4b62990f0 (patch)
tree6d7da95f85ecd99374b221ca05984d335602dda7 /phpBB/includes/ucp/ucp_pm_compose.php
parenta3d46575c7f520dc9731ed4e9221c636c5c7c31e (diff)
parentc76d797cb2c4abb97c4e887b8c175626c7c9ba1e (diff)
downloadforums-2aecb9406811cfa6fa9a6de1094479d4b62990f0.tar
forums-2aecb9406811cfa6fa9a6de1094479d4b62990f0.tar.gz
forums-2aecb9406811cfa6fa9a6de1094479d4b62990f0.tar.bz2
forums-2aecb9406811cfa6fa9a6de1094479d4b62990f0.tar.xz
forums-2aecb9406811cfa6fa9a6de1094479d4b62990f0.zip
Merge pull request #3383 from nickvergessen/ticket/9109
Ticket/9109 Properly document and calculate the group settings with value 0
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm_compose.php')
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php10
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 9859fd938c..4ff27e8cf1 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -530,15 +530,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