From 1c652b64169f9c38a99ac7ae501e14421d3f466c Mon Sep 17 00:00:00 2001 From: James Date: Thu, 29 Sep 2011 10:30:40 -0400 Subject: [PATCH] CC-2873: Soundcloud plugin doesn't log any error when there is an error with soundcloud uploading through api controller - Changed constant names - added -1 constant --- airtime_mvc/application/configs/constants.php | 5 +++-- airtime_mvc/application/controllers/ApiController.php | 2 +- utils/soundcloud-uploader.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index 73f996324..0ec295c26 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -37,5 +37,6 @@ define('UI_PLAYLIST_SESSNAME', 'PLAYLIST'); // Soundcloud contants -define('SC_PROGRESS', -2); -define('SC_ERROR', -2); +define('SOUNDCLOUD_NULL', -1); +define('SOUNDCLOUD_PROGRESS', -2); +define('SOUNDCLOUD_ERROR', -3); diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 8a256185a..7d5eb0006 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -413,7 +413,7 @@ class ApiController extends Zend_Controller_Action $this->setSoundCloudErrorCode($code); $this->setSoundCloudErrorMsg($msg); // setting sc id to -3 which indicates error - $this->setSoundCloudFileId(SC_ERROR); + $this->setSoundCloudFileId(SOUNDCLOUD_ERROR); if(!in_array($code, array(0, 100))) { break; } diff --git a/utils/soundcloud-uploader.php b/utils/soundcloud-uploader.php index 0527e8467..2882dacf7 100644 --- a/utils/soundcloud-uploader.php +++ b/utils/soundcloud-uploader.php @@ -60,6 +60,6 @@ if(count($argv) != 2){ $id = $argv[1]; $file = Application_Model_StoredFile::Recall($id); // set id with -2 which is indicator for processing -$file->setSoundCloudFileId(SC_PROGRESS); +$file->setSoundCloudFileId(SOUNDCLOUD_PROGRESS); $file->uploadToSoundCloud();