diff --git a/Controller/BackendController.php b/Controller/BackendController.php index aee7521..04d77bc 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -129,7 +129,7 @@ final class BackendController extends Controller /** @var Media[] $media */ $media = MediaMapper::getByVirtualPath($path); - $collection = CollectionMapper::getParentCollection($path); + $collection = CollectionMapper::getParentCollection(\str_replace('+', ' ', $path)); if ($collection instanceof Collection) { $media += $collection->getSources(); diff --git a/Theme/Backend/media-list.tpl.php b/Theme/Backend/media-list.tpl.php index 576a920..a3b6994 100644 --- a/Theme/Backend/media-list.tpl.php +++ b/Theme/Backend/media-list.tpl.php @@ -20,7 +20,7 @@ include __DIR__ . '/template-functions.php'; * @var \phpOMS\Views\View $this * @var string $parent */ -$mediaPath = $this->getData('path') ?? '/'; +$mediaPath = \urldecode($this->getData('path') ?? '/'); /** * @var \Modules\Media\Models\Media[] $media @@ -55,7 +55,7 @@ $media = $this->getData('media'); $subPath .= '/' . $paths[$i]; - $url = $i === $length - 1 ? UriFactory::build('{%}') : UriFactory::build('{/prefix}media/list?path=' . $subPath); + $url = UriFactory::build('{/prefix}media/list?path=' . $subPath); ?>