Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into cc-5709-airtime-analyzer-cloud-storage-saas
This commit is contained in:
commit
10db978a2b
|
@ -18,25 +18,26 @@ class Amazon_S3
|
|||
private $zendServiceAmazonS3;
|
||||
|
||||
function Amazon_S3()
|
||||
{
|
||||
$this->initZendServiceAmazonS3();
|
||||
}
|
||||
|
||||
private function initZendServiceAmazonS3()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
||||
$this->setBucket($CC_CONFIG['cloud_storage']['bucket']);
|
||||
$this->setAccessKey($CC_CONFIG['cloud_storage']['api_key']);
|
||||
$this->setSecretKey($CC_CONFIG['cloud_storage']['api_key_secret']);
|
||||
$this->setZendServiceAmazonS3();
|
||||
|
||||
$this->zendServiceAmazonS3 = new Zend_Service_Amazon_S3(
|
||||
$this->getAccessKey(),
|
||||
$this->getSecretKey());
|
||||
}
|
||||
|
||||
public function getZendServiceAmazonS3()
|
||||
{
|
||||
return $this->zendServiceAmazonS3;
|
||||
}
|
||||
|
||||
private function setZendServiceAmazonS3()
|
||||
{
|
||||
$this->zendServiceAmazonS3 = new Zend_Service_Amazon_S3(
|
||||
$this->getAccessKey(),
|
||||
$this->getSecretKey());
|
||||
return $this->zendServiceAmazonS3;
|
||||
}
|
||||
|
||||
public function getBucket()
|
||||
|
|
|
@ -26,7 +26,7 @@ class Config {
|
|||
}
|
||||
|
||||
// Parse separate conf file for Amazon S3 values
|
||||
$amazonFilename = "/etc/airtime-saas/amazon.conf";
|
||||
$amazonFilename = isset($_SERVER['AMAZONS3_CONF']) ? $_SERVER['AMAZONS3_CONF'] : "/etc/airtime-saas/amazon.conf";
|
||||
$amazonValues = parse_ini_file($amazonFilename, true);
|
||||
$CC_CONFIG['cloud_storage'] = $amazonValues['cloud_storage'];
|
||||
|
||||
|
|
|
@ -362,8 +362,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
} catch (Exception $e) {
|
||||
//could throw a scheduled in future exception.
|
||||
$message = _("Could not delete file(s).");
|
||||
Logging::debug($e->getMessage());
|
||||
Logging::info($e->getMessage());
|
||||
Logging::info($message.": ".$e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue