Index: /trunk/phpgwapi/inc/class.setup_detection.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.setup_detection.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.setup_detection.inc.php	(revision 5773)
@@ -21,5 +21,5 @@
 			while($entry=$d->read())
 			{
-				if($entry != ".." && !ereg('setup',$entry) && is_dir(PHPGW_SERVER_ROOT . '/' . $entry))
+				if($entry != ".." && !preg_match('/setup/',$entry) && is_dir(PHPGW_SERVER_ROOT . '/' . $entry))
 				{
 					$f = PHPGW_SERVER_ROOT . '/' . $entry . '/setup/setup.inc.php';
@@ -317,5 +317,5 @@
 			$config_table = $ver[0] > 0 || (int)$ver[2] > 10 ? 'phpgw_config' : 'config';
 
-			if(ereg("([0-9]+)(pre)([0-9]+)",$ver[2],$regs))
+			if(preg_match('/([0-9]+)(pre)([0-9]+)/',$ver[2],$regs))
 			{
 				if(($regs[1] == '10') && ($regs[3] >= '6'))
@@ -351,5 +351,5 @@
 			}
 			if($GLOBALS['phpgw_setup']->alessthanb($GLOBALS['setup_info']['phpgwapi']['currentver'], '0.9.14.501') ||
-			   ereg('0\.9\.15\.00[01]{1,1}',$GLOBALS['setup_info']['phpgwapi']['currentver']))
+			   preg_match('/0\.9\.15\.00[01]{1,1}/',$GLOBALS['setup_info']['phpgwapi']['currentver']))
 			{
 				$langtbl  = 'lang';
Index: /trunk/phpgwapi/inc/class.auth_ldap.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.auth_ldap.inc.php	(revision 5141)
+++ /trunk/phpgwapi/inc/class.auth_ldap.inc.php	(revision 5773)
@@ -31,5 +31,5 @@
 		function authenticate($username, $passwd)
 		{
-			if (ereg('[()|&=*,<>!~]',$username))
+			if (preg_match('/[()|&=*,<>!~]/',$username))
 			{
 				return False;
Index: /trunk/phpgwapi/inc/class.sessions_php4.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.sessions_php4.inc.php	(revision 5281)
+++ /trunk/phpgwapi/inc/class.sessions_php4.inc.php	(revision 5773)
@@ -71,5 +71,4 @@
 			$GLOBALS['phpgw_session']['session_install_id'] = $GLOBALS['phpgw_info']['server']['install_id'];
 
-			session_register('phpgw_session');
 			$_SESSION['phpgw_session'] = $GLOBALS['phpgw_session'];
 		}
@@ -143,5 +142,4 @@
 			$GLOBALS['phpgw_session']['phpgw_app_sessions']['phpgwapi']['phpgw_info_cache'] = '';
 
-			session_register('phpgw_session');
 			$_SESSION['phpgw_session'] = $GLOBALS['phpgw_session'];
 		}
Index: /trunk/phpgwapi/inc/class.sector_search_ldap.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.sector_search_ldap.inc.php	(revision 3530)
+++ /trunk/phpgwapi/inc/class.sector_search_ldap.inc.php	(revision 5773)
@@ -190,5 +190,5 @@
 	// Cria a primeira entrada na combo
 	$first_sector_ufn = ldap_dn2ufn($context);
-	$first_sector_string = split(",", $first_sector_ufn);
+	$first_sector_string = preg_split('/,/', $first_sector_ufn);
 
 	if ($context == $selected)
Index: /trunk/expressoAdmin1_2/inc/class.user.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.user.inc.php	(revision 5693)
+++ /trunk/expressoAdmin1_2/inc/class.user.inc.php	(revision 5773)
@@ -175,5 +175,5 @@
 				{
 					//retira caracteres que não são números.
-					$params['corporative_information_cpf'] = ereg_replace("[^0-9]", "", $params['corporative_information_cpf']);
+					$params['corporative_information_cpf'] = preg_replace('/[^0-9]/', '', $params['corporative_information_cpf']);
 					//description
 					$params['corporative_information_description'] = utf8_encode($params['corporative_information_description']);
@@ -289,5 +289,5 @@
 
 			//retira caracteres que não são números.
-			$new_values['corporative_information_cpf'] = ereg_replace("[^0-9]", "", $new_values['corporative_information_cpf']);
+			$new_values['corporative_information_cpf'] = preg_replace('/[^0-9]/', '', $new_values['corporative_information_cpf']);
 
 			$diff = array_diff($new_values, $old_values);
Index: /trunk/admin/inc/class.uiconfig.inc.php
===================================================================
--- /trunk/admin/inc/class.uiconfig.inc.php	(revision 5328)
+++ /trunk/admin/inc/class.uiconfig.inc.php	(revision 5773)
@@ -118,5 +118,5 @@
 					{
 						/* don't erase passwords, since we also don't print them */
-						if(!ereg('passwd',$key) && !ereg('password',$key) && !ereg('root_pw',$key) && !ereg('pw',$key))
+						if(!preg_match('/passwd/',$key) && !preg_match('/password/',$key) && !preg_match('/root_pw/',$key) && !preg_match('/pw/',$key))
 						{
 							unset($c->config_data[$key]);
@@ -339,5 +339,5 @@
 						$newval = str_replace(' ','_',$newval);
 						/* Don't show passwords in the form */
-						if(ereg('passwd',$value) || ereg('password',$value) || ereg('root_pw',$value))
+						if(preg_match('/passwd/',$value) || preg_match('/password/',$value) || preg_match('/root_pw/',$value))
 						{
 							$t->set_var($value,'');
Index: /trunk/setup/config.php
===================================================================
--- /trunk/setup/config.php	(revision 328)
+++ /trunk/setup/config.php	(revision 5773)
@@ -65,5 +65,5 @@
 
 	/* Following to ensure windows file paths are saved correctly */
-	set_magic_quotes_runtime(0);
+	magic_quotes_runtime(0);
 
 	$GLOBALS['phpgw_setup']->loaddb();
@@ -112,5 +112,5 @@
 			/* echo '<br>Updating: ' . $setting . '=' . $value; */
 			/* Don't erase passwords, since we also do not print them below */
-			if($value || (!ereg('passwd',$setting) && !ereg('password',$setting) && !ereg('root_pw',$setting)))
+			if($value || (!preg_match('/passwd/',$setting) && !preg_match('/password/',$setting) && !preg_match('/root_pw/',$setting)))
 			{
 				@$GLOBALS['phpgw_setup']->db->query("DELETE FROM $configtbl WHERE config_name='" . $setting . "'");
Index: /trunk/setup/inc/functions.inc.php
===================================================================
--- /trunk/setup/inc/functions.inc.php	(revision 2)
+++ /trunk/setup/inc/functions.inc.php	(revision 5773)
@@ -81,5 +81,5 @@
 		while($line = fgets($f,200))
 		{
-			list($x,$y) = split("\t",$line);
+			list($x,$y) = preg_split('/\t/',$line);
 			$languages[$x]['lang']  = trim($x);
 			$languages[$x]['descr'] = trim($y);
Index: /trunk/prototype/modules/calendar/interceptors/DBMapping.php
===================================================================
--- /trunk/prototype/modules/calendar/interceptors/DBMapping.php	(revision 5752)
+++ /trunk/prototype/modules/calendar/interceptors/DBMapping.php	(revision 5773)
@@ -122,5 +122,5 @@
 
 	 $params = array_merge( $params, $occ );
-         $params = self::deepnessFindEvent( &$uri , &$params , &$criteria , $original);
+         $params = self::deepnessFindEvent( $uri , $params , $criteria , $original);
 
          return false;
Index: /trunk/prototype/api/controller.php
===================================================================
--- /trunk/prototype/api/controller.php	(revision 5715)
+++ /trunk/prototype/api/controller.php	(revision 5773)
@@ -636,5 +636,5 @@
 			{
 				if( self::isConcept( $URI['concept'], $linkName ) )
-				    $data[$linkName] = self::put( array( 'concept' => $linkTarget ), $data[$linkName], &$txIds );
+				    $data[$linkName] = self::put( array( 'concept' => $linkTarget ), $data[$linkName], $txIds );
 			    else
 			    {
@@ -668,5 +668,5 @@
 			  $value[ self::links( $URI['concept'], $linkNames[ $linkTarget ] ) ] = $URI['id'];
   
-			  self::put( array( 'concept' => $linkTarget ), $value, &$txIds );
+			  self::put( array( 'concept' => $linkTarget ), $value, $txIds );
 		      }
 		}
Index: /trunk/expressoMail1_2/inc/class.exporteml.inc.php
===================================================================
--- /trunk/expressoMail1_2/inc/class.exporteml.inc.php	(revision 5316)
+++ /trunk/expressoMail1_2/inc/class.exporteml.inc.php	(revision 5773)
@@ -71,5 +71,5 @@
 			$subject = strtr($subject,$from,$to);
 
-			$subject = eregi_replace("[^a-zA-Z0-9_]", "_", $subject); 
+			$subject = preg_replace('/[^a-zA-Z0-9_]/i', '_', $subject); 
 			$file = $subject."_".$id.".eml"; 
 		} else{
@@ -82,5 +82,5 @@
 				$subject = strtr($subject,$from,$to);
 
-				$subject = eregi_replace("[^a-zA-Z0-9_]", "_", $subject); 
+				$subject = preg_replace('/[^a-zA-Z0-9_]/i', '_', $subject); 
 
 				// é necessário que a sessão faça parte do nome do arquivo para que o mesmo não venha vazio o.O 
Index: /trunk/expressoMail1_2/inc/class.imapfp.inc.php
===================================================================
--- /trunk/expressoMail1_2/inc/class.imapfp.inc.php	(revision 5362)
+++ /trunk/expressoMail1_2/inc/class.imapfp.inc.php	(revision 5773)
@@ -105,5 +105,5 @@
 				return false;
 			}
-			$response_inbox_array =  split("\r\n", $response_inbox);
+			$response_inbox_array =  preg_split('/\r\n/', $response_inbox);
 			array_pop($response_inbox_array);
 			array_shift($response_inbox_array);
@@ -126,5 +126,5 @@
 			}
 			
-			$response_sub_array =  split("\r\n", $response_sub);
+			$response_sub_array =  preg_split('/\r\n/', $response_sub);
 			array_pop($response_sub_array);
 			array_shift($response_sub_array);
