aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_groups.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-05-26 19:19:08 +0200
committerAndreas Fischer <bantu@phpbb.com>2013-05-26 19:19:08 +0200
commit06379aece8dccdfddfdf2255b12edf5e9df772ec (patch)
treece0080b7cdb3b9b03d1d2ce713222fe257c5e64d /phpBB/includes/acp/acp_groups.php
parent62a751fa65753fa40057b1f816eb1fae894a25af (diff)
parent2b356e766f8d0f3e9dfc2d1fdd6bc857fdb63497 (diff)
downloadforums-06379aece8dccdfddfdf2255b12edf5e9df772ec.tar
forums-06379aece8dccdfddfdf2255b12edf5e9df772ec.tar.gz
forums-06379aece8dccdfddfdf2255b12edf5e9df772ec.tar.bz2
forums-06379aece8dccdfddfdf2255b12edf5e9df772ec.tar.xz
forums-06379aece8dccdfddfdf2255b12edf5e9df772ec.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/11538] Add optional switch as argument to hex colour validation [ticket/11538] Modify test colour values [ticket/11538] Limit comment in acp_groups to 80 characters per line [ticket/11538] Move group ID into abstract test class and add more test cases [ticket/11538] Merge calls to validate_data() in acp_groups [ticket/11538] Rename phpbb_validate_colour to phpbb_validate_hex_colour [ticket/11538] Use abstract class for functional test cases for group colour [ticket/11538] Add function phpbb_validate_colour for validating colours [ticket/11538] Make sure regex doesn't allow multiple color values [ticket/11538] Add tests for acp group manage page [ticket/11538] Simplify colour value check and remove support for '#' [ticket/11538] Fix incorrect regex and test for duplicate # in color string [ticket/11538] Use regex for testing color value and improve tests [ticket/11538] Make sure group color can't exceed maximum of 6 characters Conflicts: phpBB/includes/functions_user.php phpBB/styles/prosilver/template/ucp_groups_manage.html
Diffstat (limited to 'phpBB/includes/acp/acp_groups.php')
-rw-r--r--phpBB/includes/acp/acp_groups.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 37c49d7d72..c740ff7ddc 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -386,13 +386,21 @@ class acp_groups
$error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_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
- if ($max_recipients_error = validate_data($submit_ary, array('max_recipients' => array('num', false, 0, 16777215))))
+ /*
+ * 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', true),
+ );
+
+ 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'), $max_recipients_error));
+ $error = array_merge($error, array_map(array(&$user, 'lang'), $validation_error));
}
if (!sizeof($error))