fix(legacy): station url always has a trailing slash (#1838)

This commit is contained in:
Jonas L 2022-05-05 19:24:51 +02:00 committed by GitHub
parent a4caf4782b
commit be5d732006
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 12 deletions

View File

@ -42,16 +42,6 @@ class Application_Common_HTTPHelper
]
);
if (empty($baseDir)) {
$baseDir = '/';
}
if ($baseDir[0] != '/') {
$baseDir = '/' . $baseDir;
}
if (substr($baseDir, -1) != '/') {
$baseDir = $baseDir . '/';
}
return rtrim($url, '/') . '/';
}

View File

@ -163,7 +163,7 @@ class CcFiles extends BaseCcFiles
$file->setDbHidden(true);
$file->save();
$callbackUrl = Application_Common_HTTPHelper::getStationUrl() . '/rest/media/' . $file->getPrimaryKey();
$callbackUrl = Application_Common_HTTPHelper::getStationUrl() . 'rest/media/' . $file->getPrimaryKey();
Application_Service_MediaService::importFileToLibrary(
$callbackUrl,

View File

@ -182,7 +182,6 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
{
$CC_CONFIG = Config::getConfig();
$stationUrl = Application_Common_HTTPHelper::getStationUrl();
$stationUrl .= substr($stationUrl, -1) == '/' ? '' : '/';
$data = [
'id' => $id,
'url' => $url,