implement a platform independent version of basename
This commit is contained in:
parent
a3ff771567
commit
e2d3225e5a
2 changed files with 7 additions and 1 deletions
2
lib/files/cache/cache.php
vendored
2
lib/files/cache/cache.php
vendored
|
@ -200,7 +200,7 @@ class Cache {
|
|||
|
||||
$data['path'] = $file;
|
||||
$data['parent'] = $this->getParentId($file);
|
||||
$data['name'] = basename($file);
|
||||
$data['name'] = \OC_Util::basename($file);
|
||||
$data['encrypted'] = isset($data['encrypted']) ? ((int)$data['encrypted']) : 0;
|
||||
|
||||
list($queryParts, $params) = $this->buildParts($data);
|
||||
|
|
|
@ -892,4 +892,10 @@ class OC_Util {
|
|||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function basename($file)
|
||||
{
|
||||
$t = explode('/', $file);
|
||||
return array_pop($t);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue