diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2010-10-25 21:52:50 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2010-10-25 21:52:50 +0200 |
| commit | a5bc7c90f552a65410a2b3abe05278346df387e5 (patch) | |
| tree | 6a5255d466688f8c70e4edb60211b227a06d43a0 | |
| parent | e87a8ef02c029a7c622b5ab8bb60e67c012a6165 (diff) | |
| parent | 257e264af74e57b55238de18f1f97e0e5b7a299a (diff) | |
| download | forums-a5bc7c90f552a65410a2b3abe05278346df387e5.tar forums-a5bc7c90f552a65410a2b3abe05278346df387e5.tar.gz forums-a5bc7c90f552a65410a2b3abe05278346df387e5.tar.bz2 forums-a5bc7c90f552a65410a2b3abe05278346df387e5.tar.xz forums-a5bc7c90f552a65410a2b3abe05278346df387e5.zip | |
Merge branch 'ticket/rxu/9478' into develop-olympus
* ticket/rxu/9478:
[ticket/9478] Validate maximum number of allowed recipients per PM value.
| -rw-r--r-- | phpBB/includes/acp/acp_groups.php | 9 | ||||
| -rw-r--r-- | phpBB/language/en/common.php | 6 |
2 files changed, 15 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 diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index bc38c1563d..e79e5a6de3 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -566,6 +566,9 @@ $lang = array_merge($lang, array( 'TEST_CONNECTION' => 'Test connection', 'THE_TEAM' => 'The team', 'TIME' => 'Time', + + 'TOO_LARGE' => 'The value you entered is too large.', + 'TOO_LARGE_MAX_RECIPIENTS' => 'The value of <strong>Maximum number of allowed recipients per private message</strong> setting you entered is too large.', 'TOO_LONG' => 'The value you entered is too long.', @@ -608,6 +611,9 @@ $lang = array_merge($lang, array( 'TOO_SHORT_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too short.', 'TOO_SHORT_WEBSITE' => 'The website address you entered is too short.', 'TOO_SHORT_YIM' => 'The Yahoo! Messenger name you entered is too short.', + + 'TOO_SMALL' => 'The value you entered is too small.', + 'TOO_SMALL_MAX_RECIPIENTS' => 'The value of <strong>Maximum number of allowed recipients per private message</strong> setting you entered is too small.', 'TOPIC' => 'Topic', 'TOPICS' => 'Topics', |
