From 48b08893f07b8c16bf2ed65f30f4fb0a4a9349b0 Mon Sep 17 00:00:00 2001 From: Paul Baranowski Date: Thu, 22 Sep 2011 15:31:21 -0400 Subject: [PATCH] CC-2306: Uploading a file that already exist error message does not have styling Tweaked message to the user. --- airtime_mvc/application/models/StoredFile.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) 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";