CC-2503: replacing UI_MDATA_KEY_TITLE with MDATA_KEY_TITLE

-fixed
This commit is contained in:
james 2011-07-04 10:00:37 -04:00
parent 6de8b09184
commit 75ea77e6a6
3 changed files with 2 additions and 5 deletions

View file

@ -4,9 +4,6 @@ define('AIRTIME_VERSION', '1.9.0-beta2');
define('AIRTIME_COPYRIGHT_DATE', '2010-2011'); define('AIRTIME_COPYRIGHT_DATE', '2010-2011');
define('AIRTIME_REST_VERSION', '1.1'); define('AIRTIME_REST_VERSION', '1.1');
// this constant is still used in somewhere
define('UI_MDATA_KEY_TITLE', 'track_title');
// Metadata Keys for files // Metadata Keys for files
define('MDATA_KEY_FILEPATH', 'filepath'); define('MDATA_KEY_FILEPATH', 'filepath');
define('MDATA_KEY_MD5', 'md5'); define('MDATA_KEY_MD5', 'md5');

View file

@ -356,7 +356,7 @@ class ApiController extends Zend_Controller_Action
$tmpTitle = !(empty($show_name))?$show_name."-":""; $tmpTitle = !(empty($show_name))?$show_name."-":"";
$tmpTitle .= $file->getName(); $tmpTitle .= $file->getName();
$file->setMetadataValue(UI_MDATA_KEY_TITLE, $tmpTitle); $file->setMetadataValue(MDATA_KEY_TITLE, $tmpTitle);
if (!$showCanceled && Application_Model_Preference::GetDoSoundCloudUpload()) if (!$showCanceled && Application_Model_Preference::GetDoSoundCloudUpload())
{ {

View file

@ -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(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."}}');
} }
} }