From 1245d1e86020d613f0e91c6c81fa204786082039 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Tue, 15 May 2012 15:17:19 -0400 Subject: [PATCH] CC-3826: Couldn't find constant MDATA_KEY_RECORD_DATE -fixed in a better way --- airtime_mvc/application/configs/constants.php | 1 - airtime_mvc/application/models/StoredFile.php | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index db3660342..1a39ddb43 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -26,7 +26,6 @@ define('MDATA_KEY_ENCODER', 'encoded_by'); define('MDATA_KEY_ISRC', 'isrc_number'); define('MDATA_KEY_COPYRIGHT', 'copyright'); define('MDATA_KEY_YEAR', 'year'); -define('MDATA_KEY_RECORD_DATE', 'year'); define('MDATA_KEY_BPM', 'bpm'); define('MDATA_KEY_TRACKNUMBER', 'track_number'); define('MDATA_KEY_CONDUCTOR', 'conductor'); diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index f72966382..945f80439 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -92,7 +92,9 @@ class Application_Model_StoredFile { else { $dbMd = array(); foreach ($p_md as $mdConst => $mdValue) { - $dbMd[constant($mdConst)] = $mdValue; + if (defined($mdConst)){ + $dbMd[constant($mdConst)] = $mdValue; + } } $this->setDbColMetadata($dbMd); }