diff options
| author | rxu <rxu@mail.ru> | 2010-10-20 00:25:31 +0800 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2010-10-25 21:47:13 +0200 |
| commit | 257e264af74e57b55238de18f1f97e0e5b7a299a (patch) | |
| tree | ad3133d3086a365b9d80b468fd8425a95c8e42e9 /phpBB/includes | |
| parent | d503272645d0f14daa2c2664e04dbdc33da9379e (diff) | |
| download | forums-257e264af74e57b55238de18f1f97e0e5b7a299a.tar forums-257e264af74e57b55238de18f1f97e0e5b7a299a.tar.gz forums-257e264af74e57b55238de18f1f97e0e5b7a299a.tar.bz2 forums-257e264af74e57b55238de18f1f97e0e5b7a299a.tar.xz forums-257e264af74e57b55238de18f1f97e0e5b7a299a.zip | |
[ticket/9478] Validate maximum number of allowed recipients per PM value.
Do not allow to enter the value larger than it's allowed by MySQL mediumnt(8).
PHPBB3-9478
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/acp/acp_groups.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index 60512c67b8..486616c33d 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -394,6 +394,15 @@ class acp_groups } } + // Validate the length of "Maximum number of allowed recipients per private message" setting. + // We use 16777215 as a maximum because it matches MySQL unsigned mediumint maximum value + // which is the lowest amongst DBMSes supported by phpBB3 + if ($max_recipients_error = validate_data($submit_ary, array('max_recipients' => array('num', false, 0, 16777215)))) + { + // Replace "error" string with its real, localised form + $error = array_merge($error, array_map(array(&$user, 'lang'), $max_recipients_error)); + } + if (!sizeof($error)) { // Only set the rank, colour, etc. if it's changed or if we're adding a new |
