gunnar: server/kolab-webadmin/kolab-webadmin/www/admin/user user.php.in, 1.22, 1.23

cvs at kolab.org cvs at kolab.org
Thu Jul 12 18:28:26 CEST 2007


Author: gunnar

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user
In directory doto:/tmp/cvs-serv1206/kolab-webadmin/www/admin/user

Modified Files:
	user.php.in 
Log Message:
Remove code duplications.

Index: user.php.in
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user/user.php.in,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- user.php.in	12 Jul 2007 05:17:31 -0000	1.22
+++ user.php.in	12 Jul 2007 16:28:23 -0000	1.23
@@ -117,23 +117,6 @@
   }
 }
 
-function checkuniquealias( $form, $key, $value ) {
-  global $ldap;
-  global $action;
-  global $dn;
-  $excludedn = false;
-  if( $action == 'save' ) $excludedn = trim($dn);
-  $lst = array_unique( array_filter( array_map( 'trim', preg_split( '/\n/', $value ) ), 'strlen') );
-  $str = '';
-  foreach( $lst as $alias ) {
-	debug( "looking at $alias, exluding $dn" );
-	if( $ldap->countMail( $_SESSION['base_dn'], $alias, $excludedn ) > 0 ) {
-	  $str .= _('Email address ').MySmarty::htmlentities($alias)._(' collides with an address already used for another user, a vCard or a distribution list.<br />');
-	}
-  }
-  return $str;
-}
-
 function checkuid( $form, $key, $value ) {
   global $ldap;
   global $action;
@@ -221,31 +204,12 @@
   return '';
 }
 
-// Due to a cyrus imapd bug we can't currently
-// support quotas over 4095 MB, see issue1262
-function checkquota( $form, $key, $value )
-{
-	if( empty($value) ) return ''; // OK
-	else if( $value >= 4096 ) return _('Quota must be smaller than 4096');
-	else if( $value < 0 ) return _('Quota can not be negative');
-	else if( !is_numeric($value) ) return _('Quota must be a number');
-	else if( (int) $value != $value ) return _('Quota must be an integer');
-	else return '';
-}
-
 function checkfreebusyfuture( $form, $key, $value )
 {
 	if( empty($value) ) return ''; // OK
 	else if( $value < 0 ) return _('Free/Busy future can not be negative');
 	else if( !is_numeric($value) ) return _('Free/Busy future must be a number');
 	else if( (int) $value != $value ) return _('Free/Busy future must be an integer');
-	else return '';
-}
-
-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 return '';
 }
 





More information about the commits mailing list