CC-5885: Factor out cloud storage code into separate class

This commit is contained in:
drigato 2014-07-11 16:16:30 -04:00
parent e7dfc08128
commit 039a51121b
7 changed files with 67 additions and 60 deletions

View file

@ -31,7 +31,7 @@ class Config {
$CC_CONFIG['webServerUser'] = $values['general']['web_server_user'];
$CC_CONFIG['rabbitmq'] = $values['rabbitmq'];
$CC_CONFIG['s3'] = $values['s3'];
$CC_CONFIG['cloud_storage'] = $values['cloud_storage'];
$CC_CONFIG['baseDir'] = $values['general']['base_dir'];
$CC_CONFIG['baseUrl'] = $values['general']['base_url'];

View file

@ -573,7 +573,7 @@ SQL;
public function getCloudUrl()
{
$CC_CONFIG = Config::getConfig();
return $CC_CONFIG["s3"]["host"]."/".$CC_CONFIG["s3"]["bucket"]."/" . urlencode($this->getResourceId());
return $CC_CONFIG["cloud_storage"]["host"]."/".$CC_CONFIG["cloud_storage"]["bucket"]."/" . urlencode($this->getResourceId());
}
public function getResourceId()