Bugfixes and itunes compatibility fix

This commit is contained in:
Duncan Sommerville 2015-11-17 17:23:21 -05:00
parent f2fae3c67e
commit 30c9c730be
4 changed files with 16 additions and 8 deletions

View file

@ -18,7 +18,14 @@ class Application_Common_HTTPHelper
);
}
public static function getStationUrl()
/**
* Construct the base station URL
*
* @param boolean $secured whether or not to use HTTPS
*
* @return string the station URL
*/
public static function getStationUrl($secured = true)
{
$CC_CONFIG = Config::getConfig();
$baseUrl = $CC_CONFIG['baseUrl'];
@ -32,7 +39,7 @@ class Application_Common_HTTPHelper
}
$scheme = "http";
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
if ($secured && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
$scheme = "https";
$basePort = "443"; //Airtime Pro compatibility hack
}