From: Christian Weiske Date: Wed, 25 Nov 2015 00:26:03 +0000 (+0100) Subject: url-encode paths X-Git-Tag: v0.1.0~9 X-Git-Url: https://git.cweiske.de/noxon-gateway.git/commitdiff_plain/35e6419688e993a868b6cf7849cd9ff8ec41e75c url-encode paths --- diff --git a/src/mediatomb.php b/src/mediatomb.php index 16b0ced..40861ae 100644 --- a/src/mediatomb.php +++ b/src/mediatomb.php @@ -8,7 +8,7 @@ function handleRequestMediatomb($fullPath, $prefix) extract($mediatomb); $smt = new Services_MediaTomb($user, $pass, $host, $port); - $path = substr($fullPath, strlen($prefix)); + $path = substr(urldecode($fullPath), strlen($prefix)); $container = $smt->getContainerByPath($path); $listItems = array(); addPreviousItem($listItems, $fullPath); @@ -16,7 +16,7 @@ function handleRequestMediatomb($fullPath, $prefix) foreach ($container->getContainers() as $subContainer) { $listItems[] = getDirItem( $subContainer->title, - $fullPath . $subContainer->title . '/' + $fullPath . urlencode($subContainer->title) . '/' ); }