Changeset 5940
- Timestamp:
- 04/13/12 10:19:53 (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/filemanager/inc/class.bofilemanager.inc.php
r5912 r5940 227 227 } 228 228 } 229 elseif ($this->hostname != "" && preg_match( '/^/'.$this->hostname, $string))229 elseif ($this->hostname != "" && preg_match("/^$this->hostname/", $string)) 230 230 // elseif (ereg ('^'.$this->hostname, $string)) 231 231 { 232 $rstring = ereg_replace ('^'.$this->hostname.'/', '', $string);233 $rstring = preg_replace 232 $rstring = preg_replace("/^$this->hostname\//", '', $string); 233 $rstring = preg_replace("/(.*)(\/|$)/Ue", "rawurlencode (base64_encode ('\\1')) . '\\2'", $rstring); 234 234 $rstring = $this->hostname.'/'.$rstring; 235 235 } -
trunk/phpgwapi/inc/class.vfs_dav.inc.php
r5921 r5940 319 319 ); 320 320 321 return ( ereg_replace ('^\.+', '', $p->fake_name));321 return (preg_replace('/^\.+/', '', $p->fake_name)); 322 322 } 323 323 … … 360 360 } 361 361 362 $string = ereg_replace ("'", "\'", $data['string']);362 $string = preg_replace("/'/", "\'", $data['string']); 363 363 364 364 return $string; … … 587 587 if (preg_match("/^$link_info[directory]\/$link_info[name](\/|$)/", $rarray['fake_full_path'])) 588 588 { 589 $rarray['real_full_path'] = ereg_replace ("^$this->basedir", '', $rarray['real_full_path']);590 $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']);589 $rarray['real_full_path'] = preg_replace("/^$this->basedir/", '', $rarray['real_full_path']); 590 $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']); 591 591 592 592 $p = $this->path_parts (array( … … 766 766 while (preg_match("/$sep"."$sep/", $basedir)) 767 767 { 768 $basedir = ereg_replace ($sep . $sep, $sep, $basedir);769 } 770 771 $basedir = ereg_replace ($sep . '$', '', $basedir);768 $basedir = preg_replace("/$sep"."$sep/", $sep, $basedir); 769 } 770 771 $basedir = preg_replace("/$sep$/", '', $basedir); 772 772 773 773 return $basedir; … … 1033 1033 if (!$data['full']) 1034 1034 { 1035 $currentdir = ereg_replace ("^/", '', $currentdir);1035 $currentdir = preg_replace('/^\//', '', $currentdir); 1036 1036 } 1037 1037 … … 1657 1657 while (list ($num, $entry) = each ($ls)) 1658 1658 { 1659 $newdir = ereg_replace ("^$f->fake_full_path", "$t->fake_full_path", $entry['directory']);1659 $newdir = preg_replace("/^$f->fake_full_path/", "$t->fake_full_path", $entry['directory']); 1660 1660 $this->mkdir (array( 1661 1661 'string' => $newdir.'/'.$entry['name'], … … 1679 1679 } 1680 1680 1681 $newdir = ereg_replace ("^$f->fake_full_path", "$t->fake_full_path", $entry['directory']);1681 $newdir = preg_replace("/^$f->fake_full_path/", "$t->fake_full_path", $entry['directory']); 1682 1682 $this->cp (array( 1683 1683 'from' => "$entry[directory]/$entry[name]", -
trunk/phpgwapi/inc/class.vfs_shared.inc.php
r5921 r5940 624 624 ); 625 625 626 return ( ereg_replace ("^\.+", '', $p->fake_name));626 return (preg_replace('/^\.+/', '', $p->fake_name)); 627 627 } 628 628 … … 761 761 while (preg_match("/$sep"."$sep/", $basedir)) 762 762 { 763 $basedir = ereg_replace ($sep . $sep, $sep, $basedir);764 } 765 766 $basedir = ereg_replace ($sep . '$', '', $basedir);763 $basedir = preg_replace("/$sep"."$sep/", $sep, $basedir); 764 } 765 766 $basedir = preg_replace("/$sep$/", '', $basedir); 767 767 768 768 return $basedir; … … 1030 1030 if (preg_match("/^$link_info[directory]\/$link_info[name](\/|$)/", $rarray['fake_full_path'])) 1031 1031 { 1032 $rarray['real_full_path'] = ereg_replace ("^$this->basedir", '', $rarray['real_full_path']);1033 $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']);1032 $rarray['real_full_path'] = preg_replace("/^$this->basedir/", '', $rarray['real_full_path']); 1033 $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']); 1034 1034 1035 1035 $p = $this->path_parts (array( … … 1197 1197 if (!$data['full']) 1198 1198 { 1199 $currentdir = ereg_replace ("^/", '', $currentdir);1199 $currentdir = preg_replace('/^\//', '', $currentdir); 1200 1200 } 1201 1201 -
trunk/phpgwapi/inc/class.vfs_sql.inc.php
r5921 r5940 1390 1390 )) as $entry) 1391 1391 { 1392 $newdir = ereg_replace ("^$f->fake_full_path", "$t->fake_full_path", $entry['directory']);1392 $newdir = preg_replace("/^$f->fake_full_path/", "$t->fake_full_path", $entry['directory']); 1393 1393 $this->mkdir (array( 1394 1394 'string' => $newdir.'/'.$entry['name'], … … 1409 1409 } 1410 1410 1411 $newdir = ereg_replace ("^$f->fake_full_path", "$t->fake_full_path", $entry['directory']);1411 $newdir = preg_replace("/^$f->fake_full_path/", "$t->fake_full_path", $entry['directory']); 1412 1412 $this->cp (array( 1413 1413 'from' => "$entry[directory]/$entry[name]", … … 1647 1647 foreach ($ls as $entry) 1648 1648 { 1649 $newdir = ereg_replace ("^$f->fake_full_path", $t->fake_full_path, $entry['directory']);1649 $newdir = preg_replace("/^$f->fake_full_path/", $t->fake_full_path, $entry['directory']); 1650 1650 $newdir_clean = $this->clean_string (array ('string' => $newdir)); 1651 1651
Note: See TracChangeset
for help on using the changeset viewer.