CC-2306: Uploading a file that already exist error message does not have styling
Tweaked message to the user.
This commit is contained in:
parent
965a649d0e
commit
48b08893f0
1 changed files with 11 additions and 11 deletions
|
@ -438,10 +438,10 @@ class Application_Model_StoredFile {
|
||||||
* Get the URL to access this file.
|
* Get the URL to access this file.
|
||||||
*/
|
*/
|
||||||
public function getFileUrl()
|
public function getFileUrl()
|
||||||
{
|
{
|
||||||
$serverName = $_SERVER['SERVER_NAME'];
|
$serverName = $_SERVER['SERVER_NAME'];
|
||||||
$serverPort = $_SERVER['SERVER_PORT'];
|
$serverPort = $_SERVER['SERVER_PORT'];
|
||||||
|
|
||||||
return "http://$serverName:$serverPort/api/get-media/file/".$this->getGunId().".".$this->getFileExtension();
|
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())) {
|
if (file_exists($duplicate->getFilePath())) {
|
||||||
$duplicateName = $duplicate->getMetadataValue('MDATA_KEY_TITLE');
|
$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;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setSoundCloudFileId($p_soundcloud_id)
|
public function setSoundCloudFileId($p_soundcloud_id)
|
||||||
{
|
{
|
||||||
$this->_file->setDbSoundCloudId($p_soundcloud_id)
|
$this->_file->setDbSoundCloudId($p_soundcloud_id)
|
||||||
->save();
|
->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSoundCloudId(){
|
public function getSoundCloudId(){
|
||||||
return $this->_file->getDbSoundCloudId();
|
return $this->_file->getDbSoundCloudId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setSoundCloudErrorCode($code){
|
public function setSoundCloudErrorCode($code){
|
||||||
$this->_file->setDbSoundCloudErrorCode($code)
|
$this->_file->setDbSoundCloudErrorCode($code)
|
||||||
->save();
|
->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSoundCloudErrorCode(){
|
public function getSoundCloudErrorCode(){
|
||||||
return $this->_file->getDbSoundCloudErrorCode();
|
return $this->_file->getDbSoundCloudErrorCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setSoundCloudErrorMsg($msg){
|
public function setSoundCloudErrorMsg($msg){
|
||||||
$this->_file->setDbSoundCloudErrorMsg($msg)
|
$this->_file->setDbSoundCloudErrorMsg($msg)
|
||||||
->save();
|
->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSoundCloudErrorMsg(){
|
public function getSoundCloudErrorMsg(){
|
||||||
return $this->_file->getDbSoundCloudErrorMsg();
|
return $this->_file->getDbSoundCloudErrorMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function uploadToSoundCloud()
|
public function uploadToSoundCloud()
|
||||||
{
|
{
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
|
|
||||||
$file = $this->_file;
|
$file = $this->_file;
|
||||||
if(is_null($file)) {
|
if(is_null($file)) {
|
||||||
return "File does not exist";
|
return "File does not exist";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue