diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index dbb4a561c..c1a46343f 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -14,7 +14,7 @@ class LibraryController extends Zend_Controller_Action ->addActionContext('context-menu', 'json') ->addActionContext('get-file-meta-data', 'html') ->addActionContext('upload-file-soundcloud', 'json') - ->addActionContext('get-upload-to-sc-status', 'json') + ->addActionContext('get-upload-to-soundcloud-status', 'json') ->initContext(); $this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME); @@ -180,7 +180,7 @@ class LibraryController extends Zend_Controller_Action //format clip lengh to 1 decimal foreach($datatables["aaData"] as &$data){ if($data[6] == 'audioclip'){ - $file = StoredFile::Recall($data[0]); + $file = Application_Model_StoredFile::Recall($data[0]); $scid = $file->getSoundCloudId(); if($scid == "-2"){ $data[1] .= ''; @@ -249,7 +249,7 @@ class LibraryController extends Zend_Controller_Action die(); } - public function getUploadToScStatusAction(){ + public function getUploadToSoundcloudStatusAction(){ $id = $this->_getParam('id'); $type = $this->_getParam('type'); if($type == "show"){ @@ -259,7 +259,7 @@ class LibraryController extends Zend_Controller_Action $this->view->error_code = $file->getSoundCloudErrorCode(); $this->view->error_msg = $file->getSoundCloudErrorMsg(); }else{ - $file = StoredFile::Recall($id); + $file = Application_Model_StoredFile::Recall($id); $this->view->sc_id = $file->getSoundCloudId(); $this->view->error_code = $file->getSoundCloudErrorCode(); $this->view->error_msg = $file->getSoundCloudErrorMsg(); diff --git a/airtime_mvc/application/models/Shows.php b/airtime_mvc/application/models/Shows.php index 1565f75e6..d0966c6b0 100644 --- a/airtime_mvc/application/models/Shows.php +++ b/airtime_mvc/application/models/Shows.php @@ -1245,7 +1245,7 @@ class Show { // get soundcloud_id if(!is_null($show["file_id"])){ - $file = StoredFile::Recall($show["file_id"]); + $file = Application_Model_StoredFile::Recall($show["file_id"]); $soundcloud_id = $file->getSoundCloudId(); }else{ $soundcloud_id = null; @@ -1364,13 +1364,13 @@ class ShowInstance { public function setSoundCloudFileId($p_soundcloud_id) { - $file = StoredFile::Recall($this->_showInstance->getDbRecordedFile()); + $file = Application_Model_StoredFile::Recall($this->_showInstance->getDbRecordedFile()); $file->setSoundCloudFileId($p_soundcloud_id); } public function getSoundCloudFileId() { - $file = StoredFile::Recall($this->_showInstance->getDbRecordedFile()); + $file = Application_Model_StoredFile::Recall($this->_showInstance->getDbRecordedFile()); return $file->getSoundCloudId(); } diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index c3237faf6..b38da1207 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -438,10 +438,10 @@ class Application_Model_StoredFile { * Get the URL to access this file. */ public function getFileUrl() - { + { $serverName = $_SERVER['SERVER_NAME']; $serverPort = $_SERVER['SERVER_PORT']; - + return "http://$serverName:$serverPort/api/get-media/file/".$this->getGunId().".".$this->getFileExtension(); } @@ -834,7 +834,7 @@ class Application_Model_StoredFile { } if (file_exists($duplicate->getFilePath())) { $duplicateName = $duplicate->getMetadataValue('MDATA_KEY_TITLE'); - die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "An identical audioclip named ' . $duplicateName . ' already exists in the storage server."}}'); + die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "An identical audioclip named \"' . $duplicateName . '\" already exists on the server."}}'); } } @@ -878,39 +878,39 @@ class Application_Model_StoredFile { return $results; } - + public function setSoundCloudFileId($p_soundcloud_id) { $this->_file->setDbSoundCloudId($p_soundcloud_id) ->save(); } - + public function getSoundCloudId(){ return $this->_file->getDbSoundCloudId(); } - + public function setSoundCloudErrorCode($code){ $this->_file->setDbSoundCloudErrorCode($code) ->save(); } - + public function getSoundCloudErrorCode(){ return $this->_file->getDbSoundCloudErrorCode(); } - + public function setSoundCloudErrorMsg($msg){ $this->_file->setDbSoundCloudErrorMsg($msg) ->save(); } - + public function getSoundCloudErrorMsg(){ return $this->_file->getDbSoundCloudErrorMsg(); } - + public function uploadToSoundCloud() { global $CC_CONFIG; - + $file = $this->_file; if(is_null($file)) { return "File does not exist"; diff --git a/airtime_mvc/application/views/scripts/error/error.phtml b/airtime_mvc/application/views/scripts/error/error.phtml index feea0c563..e84196941 100644 --- a/airtime_mvc/application/views/scripts/error/error.phtml +++ b/airtime_mvc/application/views/scripts/error/error.phtml @@ -6,24 +6,12 @@
- Message: exception->getMessage() ?> -
- -exception->getTraceAsString() ?> -- -
request->getParams(), 1) ?> -- - +
Looks like the page you were looking for doesn't exist!
+ +