Index: /trunk/phpgwapi/inc/class.vfs_shared.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.vfs_shared.inc.php	(revision 5921)
+++ /trunk/phpgwapi/inc/class.vfs_shared.inc.php	(revision 5940)
@@ -624,5 +624,5 @@
 			);
 
-			return (ereg_replace ("^\.+", '', $p->fake_name));
+			return (preg_replace('/^\.+/', '', $p->fake_name));
 		}
 
@@ -761,8 +761,8 @@
 			while (preg_match("/$sep"."$sep/", $basedir))
 			{
-				$basedir = ereg_replace ($sep . $sep, $sep, $basedir);
-			}
-
-			$basedir = ereg_replace ($sep . '$', '', $basedir);
+				$basedir = preg_replace("/$sep"."$sep/", $sep, $basedir);
+			}
+
+			$basedir = preg_replace("/$sep$/", '', $basedir);
 
 			return $basedir;
@@ -1030,6 +1030,6 @@
 					if (preg_match("/^$link_info[directory]\/$link_info[name](\/|$)/", $rarray['fake_full_path']))
 					{
-						$rarray['real_full_path'] = ereg_replace ("^$this->basedir", '', $rarray['real_full_path']);
-						$rarray['real_full_path'] = ereg_replace ("^$link_info[directory]" . SEP . "$link_info[name]", $link_info['link_directory'] . SEP . $link_info['link_name'], $rarray['real_full_path']);
+						$rarray['real_full_path'] = preg_replace("/^$this->basedir/", '', $rarray['real_full_path']);
+						$rarray['real_full_path'] = preg_replace("/^$link_info[directory]" . SEP . "$link_info[name]/", $link_info['link_directory'] . SEP . $link_info['link_name'], $rarray['real_full_path']);
 
 						$p = $this->path_parts (array(
@@ -1197,5 +1197,5 @@
 			if (!$data['full'])
 			{
-				$currentdir = ereg_replace ("^/", '', $currentdir);
+				$currentdir = preg_replace('/^\//', '', $currentdir);
 			}
 
Index: /trunk/phpgwapi/inc/class.vfs_sql.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.vfs_sql.inc.php	(revision 5921)
+++ /trunk/phpgwapi/inc/class.vfs_sql.inc.php	(revision 5940)
@@ -1390,5 +1390,5 @@
 					)) as $entry)
 				{
-					$newdir = ereg_replace ("^$f->fake_full_path", "$t->fake_full_path", $entry['directory']);
+					$newdir = preg_replace("/^$f->fake_full_path/", "$t->fake_full_path", $entry['directory']);
 					$this->mkdir (array(
 							'string'	=> $newdir.'/'.$entry['name'],
@@ -1409,5 +1409,5 @@
 					}
 
-					$newdir = ereg_replace ("^$f->fake_full_path", "$t->fake_full_path", $entry['directory']);
+					$newdir = preg_replace("/^$f->fake_full_path/", "$t->fake_full_path", $entry['directory']);
 					$this->cp (array(
 							'from'	=> "$entry[directory]/$entry[name]",
@@ -1647,5 +1647,5 @@
 				foreach ($ls as $entry)
 				{
-					$newdir = ereg_replace ("^$f->fake_full_path", $t->fake_full_path, $entry['directory']);
+					$newdir = preg_replace("/^$f->fake_full_path/", $t->fake_full_path, $entry['directory']);
 					$newdir_clean = $this->clean_string (array ('string' => $newdir));
 
Index: /trunk/phpgwapi/inc/class.vfs_dav.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.vfs_dav.inc.php	(revision 5921)
+++ /trunk/phpgwapi/inc/class.vfs_dav.inc.php	(revision 5940)
@@ -319,5 +319,5 @@
 			);
 
-			return (ereg_replace ('^\.+', '', $p->fake_name));
+			return (preg_replace('/^\.+/', '', $p->fake_name));
 		}
 
@@ -360,5 +360,5 @@
 			}
 
-			$string = ereg_replace ("'", "\'", $data['string']);
+			$string = preg_replace("/'/", "\'", $data['string']);
 
 			return $string;
@@ -587,6 +587,6 @@
 					if (preg_match("/^$link_info[directory]\/$link_info[name](\/|$)/", $rarray['fake_full_path']))
 					{
-						$rarray['real_full_path'] = ereg_replace ("^$this->basedir", '', $rarray['real_full_path']);
-						$rarray['real_full_path'] = ereg_replace ("^$link_info[directory]" . SEP . "$link_info[name]", $link_info['link_directory'] . SEP . $link_info['link_name'], $rarray['real_full_path']);
+						$rarray['real_full_path'] = preg_replace("/^$this->basedir/", '', $rarray['real_full_path']);
+						$rarray['real_full_path'] = preg_replace("/^$link_info[directory]" . SEP . "$link_info[name]/", $link_info['link_directory'] . SEP . $link_info['link_name'], $rarray['real_full_path']);
 
 						$p = $this->path_parts (array(
@@ -766,8 +766,8 @@
 			while (preg_match("/$sep"."$sep/", $basedir))
 			{
-				$basedir = ereg_replace ($sep . $sep, $sep, $basedir);
-			}
-
-			$basedir = ereg_replace ($sep . '$', '', $basedir);
+				$basedir = preg_replace("/$sep"."$sep/", $sep, $basedir);
+			}
+
+			$basedir = preg_replace("/$sep$/", '', $basedir);
 
 			return $basedir;
@@ -1033,5 +1033,5 @@
 			if (!$data['full'])
 			{
-				$currentdir = ereg_replace ("^/", '', $currentdir);
+				$currentdir = preg_replace('/^\//', '', $currentdir);
 			}
 
@@ -1657,5 +1657,5 @@
 				while (list ($num, $entry) = each ($ls))
 				{
-					$newdir = ereg_replace ("^$f->fake_full_path", "$t->fake_full_path", $entry['directory']);
+					$newdir = preg_replace("/^$f->fake_full_path/", "$t->fake_full_path", $entry['directory']);
 					$this->mkdir (array(
 							'string'	=> $newdir.'/'.$entry['name'],
@@ -1679,5 +1679,5 @@
 					}
 
-					$newdir = ereg_replace ("^$f->fake_full_path", "$t->fake_full_path", $entry['directory']);
+					$newdir = preg_replace("/^$f->fake_full_path/", "$t->fake_full_path", $entry['directory']);
 					$this->cp (array(
 							'from'	=> "$entry[directory]/$entry[name]",
Index: /trunk/filemanager/inc/class.bofilemanager.inc.php
===================================================================
--- /trunk/filemanager/inc/class.bofilemanager.inc.php	(revision 5912)
+++ /trunk/filemanager/inc/class.bofilemanager.inc.php	(revision 5940)
@@ -227,9 +227,9 @@
 				}
 			}
-			elseif ($this->hostname != "" && preg_match('/^/'.$this->hostname, $string))
+			elseif ($this->hostname != "" && preg_match("/^$this->hostname/", $string))
 //			elseif (ereg ('^'.$this->hostname, $string))
 			{
-				$rstring = ereg_replace ('^'.$this->hostname.'/', '', $string);
-				$rstring = preg_replace ("/(.*)(\/|$)/Ue", "rawurlencode (base64_encode ('\\1')) . '\\2'", $rstring);
+				$rstring = preg_replace("/^$this->hostname\//", '', $string);
+				$rstring = preg_replace("/(.*)(\/|$)/Ue", "rawurlencode (base64_encode ('\\1')) . '\\2'", $rstring);
 				$rstring = $this->hostname.'/'.$rstring;
 			}
