Merge branch 'saas-dev-publishing' of github.com:sourcefabric/Airtime into saas-dev-publishing
This commit is contained in:
commit
c89941d312
|
@ -44,7 +44,12 @@ class Application_Common_HTTPHelper
|
||||||
$basePort = "443"; //Airtime Pro compatibility hack
|
$basePort = "443"; //Airtime Pro compatibility hack
|
||||||
}
|
}
|
||||||
|
|
||||||
$stationUrl = "$scheme://${baseUrl}:${basePort}${baseDir}";
|
$portStr = "";
|
||||||
|
if (!(($scheme == "http" && $basePort == "80")
|
||||||
|
|| ($scheme == "https" && $basePort == "443"))) {
|
||||||
|
$portStr = ":${basePort}";
|
||||||
|
}
|
||||||
|
$stationUrl = "$scheme://${baseUrl}${portStr}${baseDir}";
|
||||||
|
|
||||||
return $stationUrl;
|
return $stationUrl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class PodcastEpisodes extends BasePodcastEpisodes
|
||||||
if ($podcast) {
|
if ($podcast) {
|
||||||
$fileId = $this->getDbFileId();
|
$fileId = $this->getDbFileId();
|
||||||
$key = Application_Model_Preference::getStationPodcastDownloadKey();
|
$key = Application_Model_Preference::getStationPodcastDownloadKey();
|
||||||
return Application_Common_HTTPHelper::getStationUrl()."rest/media/$fileId/download?download_key=$key";
|
return Application_Common_HTTPHelper::getStationUrl(false)."rest/media/$fileId/download?download_key=$key";
|
||||||
}
|
}
|
||||||
return parent::getDbDownloadUrl();
|
return parent::getDbDownloadUrl();
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,7 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
||||||
*/
|
*/
|
||||||
public function publish($fileId) {
|
public function publish($fileId) {
|
||||||
$id = Application_Model_Preference::getStationPodcastId();
|
$id = Application_Model_Preference::getStationPodcastId();
|
||||||
$url = $guid = Application_Common_HTTPHelper::getStationUrl()."rest/media/$fileId/download";
|
$url = $guid = Application_Common_HTTPHelper::getStationUrl(false)."rest/media/$fileId/download";
|
||||||
if (!PodcastEpisodesQuery::create()
|
if (!PodcastEpisodesQuery::create()
|
||||||
->filterByDbPodcastId($id)
|
->filterByDbPodcastId($id)
|
||||||
->findOneByDbFileId($fileId)) { // Don't allow duplicate episodes
|
->findOneByDbFileId($fileId)) { // Don't allow duplicate episodes
|
||||||
|
|
Loading…
Reference in New Issue