CC-2972: Find better way to determine domain which pypo should download from.
-fixed
This commit is contained in:
parent
a5dedced31
commit
60281f4e90
|
@ -448,14 +448,24 @@ class Application_Model_StoredFile {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the URL to access this file using the server name/address that
|
* Get the URL to access this file using the server name/address that
|
||||||
* is specified in the airtime.conf config file.
|
* is specified in the airtime.conf config file. If either of these is
|
||||||
|
* not specified, then use values provided by the $_SERVER global variable.
|
||||||
*/
|
*/
|
||||||
public function getFileUrlUsingConfigAddress(){
|
public function getFileUrlUsingConfigAddress(){
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$serverName = $CC_CONFIG['baseUrl'];
|
if (isset($CC_CONFIG['baseUrl'])){
|
||||||
$serverPort = $CC_CONFIG['basePort'];
|
$serverName = $CC_CONFIG['baseUrl'];
|
||||||
|
} else {
|
||||||
|
$serverName = $_SERVER['SERVER_NAME'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($CC_CONFIG['basePort'])){
|
||||||
|
$serverPort = $CC_CONFIG['basePort'];
|
||||||
|
} else {
|
||||||
|
$serverPort = $_SERVER['SERVER_PORT'];
|
||||||
|
}
|
||||||
|
|
||||||
return $this->constructGetFileUrl($serverName, $serverPort);
|
return $this->constructGetFileUrl($serverName, $serverPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue