diff --git a/airtime_mvc/application/amazon/Amazon_S3.php b/airtime_mvc/application/amazon/Amazon_S3.php index dcf7011ca..ea8a3e055 100644 --- a/airtime_mvc/application/amazon/Amazon_S3.php +++ b/airtime_mvc/application/amazon/Amazon_S3.php @@ -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() diff --git a/airtime_mvc/application/configs/conf.php b/airtime_mvc/application/configs/conf.php index 30918e4de..fd66453dd 100644 --- a/airtime_mvc/application/configs/conf.php +++ b/airtime_mvc/application/configs/conf.php @@ -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']; diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index ba836cb82..48e0e026f 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -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()); } } }