Index: /trunk/phpgwapi/inc/class.sessions.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.sessions.inc.php	(revision 5141)
+++ /trunk/phpgwapi/inc/class.sessions.inc.php	(revision 5281)
@@ -1177,10 +1177,10 @@
 				while ($i < count($a))
 				{
-					$b = split('=', $a[$i],2);
+					$b = preg_split('/=/', $a[$i],2);
 					// Check if this value doesn't already exist in new_extravars
 					if(array_key_exists($b[0], $new_extravars))
 					{
 						// print "Debug::Error !!! " . $b[0] . " ($i) already exists<br>";
-						if( eregi("\[\]", $b[0]) )
+						if( preg_match('/\[\]/i', $b[0]) )
 						{
 							$b[0] = eregi_replace("\[\]", "[$i]", $b[0]);
Index: /trunk/phpgwapi/inc/class.browser.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.browser.inc.php	(revision 5141)
+++ /trunk/phpgwapi/inc/class.browser.inc.php	(revision 5281)
@@ -51,22 +51,22 @@
 				Determine browser and version
 			*/
-			if(ereg('MSIE ([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
+			if(preg_match('/MSIE ([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version))
 			{
 				$this->BROWSER_VER = $log_version[1];
 				$this->BROWSER_AGENT = 'IE';
 			}
-			elseif(ereg('Opera ([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
-				ereg('Opera/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
+			elseif(preg_match('/Opera ([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version) ||
+				preg_match('/Opera\/([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version))
 			{
 				$this->BROWSER_VER   = $log_version[1];
 				$this->BROWSER_AGENT = 'OPERA';
 			}
-			elseif(eregi('iCab ([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version) ||
-				eregi('iCab/([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version))
+			elseif(preg_match('/iCab ([0-9].[0-9a-zA-Z]{1,4})/i',$HTTP_USER_AGENT,$log_version) ||
+				preg_match('/iCab\/([0-9].[0-9a-zA-Z]{1,4})/i',$HTTP_USER_AGENT,$log_version))
 			{
 				$this->BROWSER_VER   = $log_version[1];
 				$this->BROWSER_AGENT = 'iCab';
 			} 
-			elseif(ereg('Gecko',$HTTP_USER_AGENT,$log_version))
+			elseif(preg_match('/Gecko/',$HTTP_USER_AGENT,$log_version))
 			{
 				if(isset($log_version[1]))
@@ -74,6 +74,6 @@
 				$this->BROWSER_AGENT = 'MOZILLA';
 			}
-			elseif(ereg('Konqueror/([0-9].[0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
-				ereg('Konqueror/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
+			elseif(preg_match('/Konqueror\/([0-9].[0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version) ||
+				preg_match('/Konqueror\/([0-9].[0-9]{1,2})/',$HTTP_USER_AGENT,$log_version))
 			{
 				$this->BROWSER_VER=$log_version[1];
Index: /trunk/phpgwapi/inc/class.error.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.error.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.error.inc.php	(revision 5281)
@@ -61,5 +61,5 @@
 			$fname = $parms['file'];
 			$line  = $parms['line'];
-			if (eregi('([DIWEF])-([[:alnum:]]*)\, (.*)',$etext,$match))
+			if (preg_match('/([DIWEF])-([[:alnum:]]*)\, (.*)/i',$etext,$match))
 			{
 				$this->severity = strtoupper($match[1]);
Index: /trunk/phpgwapi/inc/class.sessions_php4.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.sessions_php4.inc.php	(revision 3018)
+++ /trunk/phpgwapi/inc/class.sessions_php4.inc.php	(revision 5281)
@@ -97,5 +97,4 @@
 			$GLOBALS['phpgw_session']['session_action'] = $action;
 
-			session_register('phpgw_session');
 			$_SESSION['phpgw_session'] = $GLOBALS['phpgw_session'];
 
@@ -173,5 +172,4 @@
 				$encrypteddata = $GLOBALS['phpgw']->crypto->encrypt($data);
 				$GLOBALS['phpgw_session']['phpgw_app_sessions'][$appname][$location]['content'] = $encrypteddata;
-				session_register('phpgw_session');
 				$_SESSION['phpgw_session'] = $GLOBALS['phpgw_session'];
 				return $data;
Index: /trunk/phpgwapi/inc/class.html.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.html.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.html.inc.php	(revision 5281)
@@ -22,8 +22,8 @@
 	{
 		// should be Ok for all HTML 4 compatible browsers
-		if (!eregi('(Safari)/([0-9.]+)',$_SERVER['HTTP_USER_AGENT'],$parts) &&
-			!eregi('compatible; ([a-z_]+)[/ ]+([0-9.]+)',$_SERVER['HTTP_USER_AGENT'],$parts))
-		{
-			eregi('^([a-z_]+)/([0-9.]+)',$_SERVER['HTTP_USER_AGENT'],$parts);
+		if (!preg_match('/(Safari)\/([0-9.]+)/i',$_SERVER['HTTP_USER_AGENT'],$parts) &&
+			!preg_match('/compatible; ([a-z_]+)[\/ ]+([0-9.]+)/i',$_SERVER['HTTP_USER_AGENT'],$parts))
+		{
+			preg_match('/^([a-z_]+)\/([0-9.]+)/i',$_SERVER['HTTP_USER_AGENT'],$parts);
 		}
 		list(,$this->user_agent,$this->ua_version) = $parts;
Index: /trunk/phpgwapi/inc/functions.inc.php
===================================================================
--- /trunk/phpgwapi/inc/functions.inc.php	(revision 5164)
+++ /trunk/phpgwapi/inc/functions.inc.php	(revision 5281)
@@ -101,5 +101,4 @@
 	}
 
-	magic_quotes_runtime(false);
 	print_debug('sane environment','messageonly','api');
 
@@ -406,5 +405,5 @@
 		while ($phpgw_class_name = each($GLOBALS['phpgw_info']['flags']))
 		{
-			if (ereg('enable_',$phpgw_class_name[0]))
+			if (preg_match('/enable_/',$phpgw_class_name[0]))
 			{
 				$enable_class = str_replace('enable_','',$phpgw_class_name[0]);
Index: /trunk/phpgwapi/templates/default/login_default.php
===================================================================
--- /trunk/phpgwapi/templates/default/login_default.php	(revision 5164)
+++ /trunk/phpgwapi/templates/default/login_default.php	(revision 5281)
@@ -364,5 +364,5 @@
 	foreach($_GET as $name => $value)
 	{
-		if(ereg('phpgw_',$name))
+		if(preg_match('/phpgw_/',$name))
 		{
 			$extra_vars .= '&' . $name . '=' . urlencode($value);
Index: /trunk/calendar/inc/class.bocalendar.inc.php
===================================================================
--- /trunk/calendar/inc/class.bocalendar.inc.php	(revision 5132)
+++ /trunk/calendar/inc/class.bocalendar.inc.php	(revision 5281)
@@ -192,5 +192,5 @@
 			$owner = get_var('owner',array('GET','POST'),$GLOBALS['owner']);
 
-			ereg('menuaction=([a-zA-Z.]+)',$_SERVER['HTTP_REFERER'],$regs);
+			preg_match('/menuaction=([a-zA-Z.]+)/',$_SERVER['HTTP_REFERER'],$regs);
 			$from = $regs[1];
 			if ((substr($_SERVER['PHP_SELF'],-8) == 'home.php' && substr($this->prefs['calendar']['defaultcalendar'],0,7) == 'planner'
@@ -3539,5 +3539,5 @@
 					
 					
-					list($subject,$body1) = split("\n",$GLOBALS['phpgw']->preferences->parse_notify($notify_msg,$details),2);
+					list($subject,$body1) = preg_split('/\n/',$GLOBALS['phpgw']->preferences->parse_notify($notify_msg,$details),2);
 					
 					switch($part_prefs['calendar']['update_format'])
@@ -3791,5 +3791,5 @@
 					$details['startdate'] = $GLOBALS['phpgw']->common->show_date($starttime);
 					$details['enddate']   = $GLOBALS['phpgw']->common->show_date($endtime);
-					list($subject,$body1) = split("\n",$GLOBALS['phpgw']->preferences->parse_notify($notify_msg,$details),2);
+					list($subject,$body1) = preg_split('/\n/',$GLOBALS['phpgw']->preferences->parse_notify($notify_msg,$details),2);
 				}
 				
Index: /trunk/calendar/inc/class.socalendar_sql.inc.php
===================================================================
--- /trunk/calendar/inc/class.socalendar_sql.inc.php	(revision 5243)
+++ /trunk/calendar/inc/class.socalendar_sql.inc.php	(revision 5281)
@@ -794,5 +794,5 @@
 		function store_event()
 		{
-			return $this->save_event(&$this->event);
+			return $this->save_event($this->event);
 		}
 
