From a547ba3f9d569410107574a151af9a2f301bb68e Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 14 May 2013 19:44:55 +0200 Subject: [ticket/11538] Use regex for testing color value and improve tests We are now using a regex with preg_match() in order to properly check if the entered color value is in hex color format or not. A proper error message is triggered if an incorrect color value is entered and the prepended '#' is removed if necessary. PHPBB3-11538 --- phpBB/language/en/common.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/language/en/common.php') diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index baf398b146..129deb551c 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -120,6 +120,7 @@ $lang = array_merge($lang, array( 'CLICK_VIEW_PRIVMSG' => '%sGo to your inbox%s', 'COLLAPSE_VIEW' => 'Collapse view', 'CLOSE_WINDOW' => 'Close window', + 'COLOUR_INVALID' => 'The colour value you entered is invalid.', 'COLOUR_SWATCH' => 'Colour swatch', 'COMMA_SEPARATOR' => ', ', // Used in pagination of ACP & prosilver, use localised comma if appropriate, eg: Ideographic or Arabic 'CONFIRM' => 'Confirm', -- cgit v1.2.1 From deefe5c0e48534cea1327cf685255d109d9d7e2c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 14 May 2013 22:39:33 +0200 Subject: [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 --- phpBB/language/en/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/language/en/common.php') diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 129deb551c..c986e8213d 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -120,7 +120,6 @@ $lang = array_merge($lang, array( 'CLICK_VIEW_PRIVMSG' => '%sGo to your inbox%s', 'COLLAPSE_VIEW' => 'Collapse view', 'CLOSE_WINDOW' => 'Close window', - 'COLOUR_INVALID' => 'The colour value you entered is invalid.', 'COLOUR_SWATCH' => 'Colour swatch', 'COMMA_SEPARATOR' => ', ', // Used in pagination of ACP & prosilver, use localised comma if appropriate, eg: Ideographic or Arabic 'CONFIRM' => 'Confirm', @@ -723,6 +722,7 @@ $lang = array_merge($lang, array( 'WHO_IS_ONLINE' => 'Who is online', 'WRONG_PASSWORD' => 'You entered an incorrect password.', + 'WRONG_DATA_COLOUR' => 'The colour value you entered is invalid.', 'WRONG_DATA_ICQ' => 'The number you entered is not a valid ICQ number.', 'WRONG_DATA_JABBER' => 'The name you entered is not a valid Jabber account name.', 'WRONG_DATA_LANG' => 'The language you specified is not valid.', -- cgit v1.2.1