mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 00:37:42 +02:00
[ticket/11538] Simplify colour value check and remove support for '#'
The input length for the hex color is now limited to 6 characters and the support for colors starting with a '#' has been dropped. The allowed input length of 7 in prosilver seems to have been a relict from old ages of phpBB3. In order to have proper support for correct checking of the colour value, the new code was also ported to the ACP groups manage page. The tests have been modified to reflect the changes to the behavior of the color check. Tests for the ACP will follow. PHPBB3-11538
This commit is contained in:
@@ -15,15 +15,14 @@ class phpbb_functional_ucp_groups_test extends phpbb_functional_test_case
|
||||
public function groups_manage_test_data()
|
||||
{
|
||||
return array(
|
||||
array('#AA0000', 'GROUP_UPDATED'),
|
||||
array('#AA0000', 'WRONG_DATA_COLOUR'),
|
||||
array('AA0000', 'GROUP_UPDATED'),
|
||||
array('AA0000v', 'COLOUR_INVALID'),
|
||||
array('vAA0000', 'COLOUR_INVALID'),
|
||||
array('AAG000', 'COLOUR_INVALID'),
|
||||
array('#a00', 'GROUP_UPDATED'),
|
||||
array('ag0', 'COLOUR_INVALID'),
|
||||
array('#ag0', 'COLOUR_INVALID'),
|
||||
array('##bcc', 'COLOUR_INVALID'),
|
||||
array('AA0000v', 'WRONG_DATA_COLOUR'),
|
||||
array('vAA0000', 'WRONG_DATA_COLOUR'),
|
||||
array('AAG000','WRONG_DATA_COLOUR'),
|
||||
array('a00', 'GROUP_UPDATED'),
|
||||
array('ag0', 'WRONG_DATA_COLOUR'),
|
||||
array('#aa0', 'WRONG_DATA_COLOUR'),
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user