thomas: server/kolab-webadmin/kolab-webadmin/php/admin/include form.class.php, 1.33, 1.34

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


Author: thomas

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/php/admin/include
In directory doto:/tmp/cvs-serv19361/kolab-webadmin/kolab-webadmin/php/admin/include

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/kolab-webadmin/kolab-webadmin/php/admin/include/form.class.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- form.class.php	21 Nov 2007 16:16:51 -0000	1.33
+++ form.class.php	2 Jun 2008 15:43:34 -0000	1.34
@@ -52,7 +52,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