aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-05-19 11:38:11 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-05-19 11:38:11 +0200
commit373e26ca746699f466e768406b951e6cf09ed284 (patch)
tree26b41c54b9f0ab1f9963f1dc5aaa88ee30a8b6ad /phpBB/includes/acp
parentb49ce5eb3a54a6c256955d3510fe409a6f4511aa (diff)
downloadforums-373e26ca746699f466e768406b951e6cf09ed284.tar
forums-373e26ca746699f466e768406b951e6cf09ed284.tar.gz
forums-373e26ca746699f466e768406b951e6cf09ed284.tar.bz2
forums-373e26ca746699f466e768406b951e6cf09ed284.tar.xz
forums-373e26ca746699f466e768406b951e6cf09ed284.zip
[ticket/11538] Merge calls to validate_data() in acp_groups
PHPBB3-11538
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_groups.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 25df9e357e..bddad78bf2 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -413,20 +413,21 @@ 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));
- }
+ /*
+ * 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.
+ * Also validate the submitted colour value.
+ */
+ $validation_checks = array(
+ 'max_recipients' => array('num', false, 0, 16777215),
+ 'colour' => array('hex_colour'),
+ );
- // Validate submitted colour value
- if ($colour_error = validate_data($submit_ary, array('colour' => array('hex_colour'))))
+ if ($validation_error = validate_data($submit_ary, $validation_checks))
{
// Replace "error" string with its real, localised form
- $error = array_merge($error, array_map(array(&$user, 'lang'), $colour_error));
+ $error = array_merge($error, array_map(array(&$user, 'lang'), $validation_error));
}
if (!sizeof($error))