gunnar: server/kolab-webadmin/kolab-webadmin/www/admin/addressbook addr.php.in, 1.7, 1.8

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/addressbook
In directory doto:/tmp/cvs-serv1206/kolab-webadmin/www/admin/addressbook

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

Index: addr.php.in
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/addressbook/addr.php.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- addr.php.in	12 Jul 2007 05:17:31 -0000	1.7
+++ addr.php.in	12 Jul 2007 16:28:23 -0000	1.8
@@ -74,30 +74,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 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 '';
-}
-
 /**** Submenu for current page ***/
 $menuitems[$sidx]['selected'] = 'selected';
 $heading = '';





More information about the commits mailing list