thomas: server/php-kolab/Kolab_Webadmin/Webadmin form.class.php, 1.6, 1.7

cvs at kolab.org cvs at kolab.org
Mon Jun 2 17:43:36 CEST 2008


Author: thomas

Update of /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin
In directory doto:/tmp/cvs-serv19361/php-kolab/Kolab_Webadmin/Webadmin

Modified Files:
	form.class.php 
Log Message:
Fix kolab/issue2739 (Some characters are not allowed in users fax-/phonenumbers despite the description in the error)

Space was missing from the regular expression and the minus sign has to
be at the beginning or the end of [...]

side note 1: the \ before / is really needed
side note 2: php-kolab/Kolab_Webadmin/Webadmin/form.class.php seems unused,
 but I fixed it, too, to avoid copy&paste errors in the future.


Index: form.class.php
===================================================================
RCS file: /kolabrepository/server/php-kolab/Kolab_Webadmin/Webadmin/form.class.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- form.class.php	21 Nov 2007 16:32:11 -0000	1.6
+++ form.class.php	2 Jun 2008 15:43:34 -0000	1.7
@@ -62,7 +62,7 @@
 function checkphone( $form, $key, $value )
 {
 	if( empty($value) ) return ''; // OK
-	else if( !preg_match('/^[a-zA-Z0-9()-+\/.=?:]*$/',$value) ) return _('Phone entries may only contain a-z, numbers and the characters ()-+/.=?:');
+	else if( !preg_match('/^[a-zA-Z0-9 ()+\/.=?:-]*$/',$value) ) return _('Phone entries may only contain a-z, numbers, spaces and the characters ()-+/.=?:');
 	else return '';
 }
 





More information about the commits mailing list