diff --git a/api/src/Vfs/StreamWrapper.php b/api/src/Vfs/StreamWrapper.php index 966c355708..6d23c584c5 100644 --- a/api/src/Vfs/StreamWrapper.php +++ b/api/src/Vfs/StreamWrapper.php @@ -748,7 +748,7 @@ class StreamWrapper implements StreamWrapperIface (!self::HIDE_UNREADABLES || $this->opened_dir_writable || Vfs::check_access($mounted,Vfs::READABLE))) { - $this->extra_dirs[] = basename($mounted); + $this->extra_dirs[] = Vfs::basename($mounted); } } @@ -852,14 +852,14 @@ class StreamWrapper implements StreamWrapperIface } // check if a failed url_stat was for a home dir, in that case silently create it if (!$stat && $try_create_home && Vfs::dirname(Vfs::parse_url($path,PHP_URL_PATH)) == '/home' && - ($id = $GLOBALS['egw']->accounts->name2id(basename($path))) && - $GLOBALS['egw']->accounts->id2name($id) == basename($path)) // make sure path has the right case! + ($id = $GLOBALS['egw']->accounts->name2id(Vfs::basename($path))) && + $GLOBALS['egw']->accounts->id2name($id) == Vfs::basename($path)) // make sure path has the right case! { $hook_data = array( 'location' => $GLOBALS['egw']->accounts->get_type($id) == 'g' ? 'addgroup' : 'addaccount', 'account_id' => $id, - 'account_lid' => basename($path), - 'account_name' => basename($path), + 'account_lid' => Vfs::basename($path), + 'account_name' => Vfs::basename($path), ); call_user_func(array(__NAMESPACE__.'\\Hooks',$hook_data['location']),$hook_data); unset($hook_data); diff --git a/api/src/Vfs/WebDAV.php b/api/src/Vfs/WebDAV.php index 34e7630683..2a0d1a4419 100644 --- a/api/src/Vfs/WebDAV.php +++ b/api/src/Vfs/WebDAV.php @@ -199,9 +199,9 @@ class WebDAV extends HTTP_WebDAV_Server_Filesystem if (!$options["overwrite"]) { return "412 precondition failed"; } - $dest .= basename($source); + $dest .= Vfs::basename($source); if (file_exists($dest)) { - $options["dest"] .= basename($source); + $options["dest"] .= Vfs::basename($source); } else { $new = true; $existing_col = true; @@ -737,11 +737,11 @@ class WebDAV extends HTTP_WebDAV_Server_Filesystem if (substr($file['path'],-1) == '/') { - $name = basename(substr($file['path'],0,-1)).'/'; + $name = Vfs::basename(substr($file['path'],0,-1)).'/'; } else { - $name = basename($file['path']); + $name = Vfs::basename($file['path']); } echo "\t