Minor fix

This commit is contained in:
alekseybobkov 2015-03-15 22:06:52 -07:00
parent 44c08b76f9
commit 64e3b77eae
2 changed files with 78 additions and 8473 deletions

File diff suppressed because it is too large Load Diff

View File

@ -197,13 +197,14 @@ class MediaManager extends WidgetBase
protected function splitPathToSegments($path)
{
$path = MediaLibrary::validatePath($path, true);
$result = [];
do {
$result[] = $path;
} while (($path = dirname($path)) != '/');
$path = ltrim($path, '/');
return array_reverse($result);
$result = explode('/', $path);
if (count($result) == 1 && $result[0] == '')
$result = [];
return $result;
}
/**