implement a platform independent version of basename
This commit is contained in:
parent
a3ff771567
commit
e2d3225e5a
|
@ -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 New Issue