CC-2471:error when upload a duplicate

- fixed as Paul requested
This commit is contained in:
james 2011-06-30 13:36:44 -04:00
parent b22a6268f2
commit 3d819297b9

View file

@ -172,7 +172,7 @@ class StoredFile {
*/ */
public function getMetadataValue($p_category) public function getMetadataValue($p_category)
{ {
return $this->getDbColMetadataValue(constant($p_category)); return $this->getDbColMetadataValue($p_category);
} }
/** /**
@ -805,7 +805,7 @@ class StoredFile {
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": ' . $duplicate->getMessage() .'}}'); die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": ' . $duplicate->getMessage() .'}}');
} }
if (file_exists($duplicate->getFilePath())) { if (file_exists($duplicate->getFilePath())) {
$duplicateName = $duplicate->getMetadataValue("UI_MDATA_KEY_TITLE"); $duplicateName = $duplicate->getMetadataValue(UI_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 in the storage server."}}');
} }
} }