diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-05-14 13:43:53 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-05-14 13:43:53 +0200 |
commit | b7b0b0ccc3fbf92324948e8c5e616a3e06343600 (patch) | |
tree | 94b4d08f0290018d849a76fde2d66f10c12d3317 /phpBB/includes/ucp/ucp_groups.php | |
parent | 45e014d35d755363224a8a84dd9bb51299a6f107 (diff) | |
download | forums-b7b0b0ccc3fbf92324948e8c5e616a3e06343600.tar forums-b7b0b0ccc3fbf92324948e8c5e616a3e06343600.tar.gz forums-b7b0b0ccc3fbf92324948e8c5e616a3e06343600.tar.bz2 forums-b7b0b0ccc3fbf92324948e8c5e616a3e06343600.tar.xz forums-b7b0b0ccc3fbf92324948e8c5e616a3e06343600.zip |
[ticket/11538] Make sure group color can't exceed maximum of 6 characters
In order to prevent future issues with this, a basic set of functional
tests for the UCP groups manage page have been added.
PHPBB3-11538
Diffstat (limited to 'phpBB/includes/ucp/ucp_groups.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_groups.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index d62dbb1866..c1db19774a 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -597,6 +597,16 @@ class ucp_groups if (!sizeof($error)) { + // Make sure maximum length of 6 of group color is not exceeded + if (strpos($submit_ary['colour'], '#') === 0) + { + $submit_ary['colour'] = substr($submit_ary['colour'], 1, 6); + } + else + { + $submit_ary['colour'] = substr($submit_ary['colour'], 0, 6); + } + // Only set the rank, colour, etc. if it's changed or if we're adding a new // group. This prevents existing group members being updated if no changes // were made. |