SAAS-505: Extract Amazon_S3 class and have it inherit from a general 'cloud backend' class

Fixed reading credentials in from cloud_storage.conf
This commit is contained in:
drigato 2014-12-02 09:06:28 -05:00
parent 7c0a25be7f
commit bf91677f91
3 changed files with 12 additions and 10 deletions

View file

@ -28,9 +28,11 @@ class Config {
// Parse separate conf file for cloud storage values
$cloudStorageConfig = isset($_SERVER['CLOUD_STORAGE_CONF']) ? $_SERVER['CLOUD_STORAGE_CONF'] : "/etc/airtime-saas/cloud_storage.conf";
$cloudStorageValues = parse_ini_file($cloudStorageConfig, true);
$currentStorageBackend = $cloudStorageValues['current_backend']['storage_backend'];
$CC_CONFIG['current_backend'] = $cloudStorageValues['current_backend']['storage_backend'];
$CC_CONFIG['storage_backend'] = $cloudStorageValues[$currentStorageBackend];
$supportedStorageBackends = array('amazon_S3');
foreach ($supportedStorageBackends as $backend) {
$CC_CONFIG[$backend] = $cloudStorageValues[$backend];
}
$values = parse_ini_file($filename, true);