Some more basename replacing with Vfs::basename to avoid setlocale issue.

This commit is contained in:
Hadi Nategh 2018-08-01 11:11:16 +02:00
parent 17cfcf1168
commit 7e126290f7
3 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ class Image
*/
protected static function get_extension($path, &$name=null)
{
$parts = explode('.', basename($path));
$parts = explode('.', Vfs::basename($path));
$ext = array_pop($parts);
$name = implode('.', $parts);
return $ext;

View File

@ -1287,7 +1287,7 @@ class Link extends Link\Storage
$link = self::get_link(-$app);
if($link['app2'] && $link['id2'])
{
Storage\History::static_add($link['app2'],$link['id2'],$GLOBALS['egw_info']['user']['account_id'],'~file~','', basename($url));
Storage\History::static_add($link['app2'],$link['id2'],$GLOBALS['egw_info']['user']['account_id'],'~file~','', Vfs::basename($url));
}
}
if (($Ok = !file_exists($url) || Vfs::remove($url,true)) && ((int)$app > 0 || $fname))

View File

@ -6760,7 +6760,7 @@ class Mail
// do not change urls for absolute images (thanks to corvuscorax)
if (substr($url, 0, 5) !== 'data:')
{
$filename = basename($url);
$filename = Vfs::basename($url);
if (($directory = dirname($url)) == '.') $directory = '';
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$mimeType = MimeMagic::ext2mime($ext);