mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 11:23:54 +01:00
Replace basename with Vfs::basename to avoid setlocale issue.
This commit is contained in:
parent
0e1d21e427
commit
17cfcf1168
@ -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);
|
||||
|
@ -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<tr class='$class'>\n\t\t<td>$n</td>\n\t\t<td>".
|
||||
|
Loading…
Reference in New Issue
Block a user