forked from extern/egroupware
Some more basename replacing with Vfs::basename to avoid setlocale issue.
This commit is contained in:
parent
8a050968e8
commit
19907b188a
@ -100,7 +100,7 @@ class Image
|
|||||||
*/
|
*/
|
||||||
protected static function get_extension($path, &$name=null)
|
protected static function get_extension($path, &$name=null)
|
||||||
{
|
{
|
||||||
$parts = explode('.', basename($path));
|
$parts = explode('.', Vfs::basename($path));
|
||||||
$ext = array_pop($parts);
|
$ext = array_pop($parts);
|
||||||
$name = implode('.', $parts);
|
$name = implode('.', $parts);
|
||||||
return $ext;
|
return $ext;
|
||||||
|
@ -1287,7 +1287,7 @@ class Link extends Link\Storage
|
|||||||
$link = self::get_link(-$app);
|
$link = self::get_link(-$app);
|
||||||
if($link['app2'] && $link['id2'])
|
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))
|
if (($Ok = !file_exists($url) || Vfs::remove($url,true)) && ((int)$app > 0 || $fname))
|
||||||
|
@ -6760,7 +6760,7 @@ class Mail
|
|||||||
// do not change urls for absolute images (thanks to corvuscorax)
|
// do not change urls for absolute images (thanks to corvuscorax)
|
||||||
if (substr($url, 0, 5) !== 'data:')
|
if (substr($url, 0, 5) !== 'data:')
|
||||||
{
|
{
|
||||||
$filename = basename($url);
|
$filename = Vfs::basename($url);
|
||||||
if (($directory = dirname($url)) == '.') $directory = '';
|
if (($directory = dirname($url)) == '.') $directory = '';
|
||||||
$ext = pathinfo($filename, PATHINFO_EXTENSION);
|
$ext = pathinfo($filename, PATHINFO_EXTENSION);
|
||||||
$mimeType = MimeMagic::ext2mime($ext);
|
$mimeType = MimeMagic::ext2mime($ext);
|
||||||
|
Loading…
Reference in New Issue
Block a user