Merge pull request #309 from xabispacebiker/pypo-permission-fix

Pypo permission fix
This commit is contained in:
Lucas Bickel 2017-09-29 20:43:27 +02:00 committed by GitHub
commit b5b24f3464
3 changed files with 6 additions and 3 deletions

View file

@ -37,6 +37,9 @@ class Application_Common_HTTPHelper
if ($baseDir[0] != "/") {
$baseDir = "/" . $baseDir;
}
if (substr($baseDir, -1) != "/") {
$baseDir = $baseDir . "/";
}
$scheme = "http";
if ($secured && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
@ -102,4 +105,4 @@ class ZendActionHttpException extends Exception {
parent::__construct($message, $code, $previous);
}
}
}

View file

@ -1030,7 +1030,7 @@ SQL;
$file = $storedFile->getPropelOrm();
//Even local files are downloaded through the REST API in case we need to transform
//their filenames (eg. in the case of a bad file extension, because Liquidsoap won't play them)
$uri = Application_Common_HTTPHelper::getStationUrl() . "/rest/media/" . $media_id;
$uri = Application_Common_HTTPHelper::getStationUrl() . "rest/media/" . $media_id;
//$uri = $file->getAbsoluteFilePath();
$filesize = $file->getFileSize();