From 25c28da7611c4cb7a8b7d897109cdb80581dc596 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 16 Oct 2012 15:29:05 -0400 Subject: [PATCH 1/3] CC-4550: Track should not be a required field in metadata editor -fixed --- airtime_mvc/application/forms/EditAudioMD.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/airtime_mvc/application/forms/EditAudioMD.php b/airtime_mvc/application/forms/EditAudioMD.php index ba7b1c4ef..2dc9e1f0f 100644 --- a/airtime_mvc/application/forms/EditAudioMD.php +++ b/airtime_mvc/application/forms/EditAudioMD.php @@ -32,9 +32,7 @@ class Application_Form_EditAudioMD extends Zend_Form $this->addElement('text', 'track_number', array( 'label' => 'Track:', 'class' => 'input_text', - 'filters' => array('StringTrim'), - 'validators' => array('Int'), - 'required' => true + 'filters' => array('StringTrim') )); // Add genre field From 819dcf70fddabeab4a6231b9096a1a4cc8b51ea2 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 16 Oct 2012 15:56:03 -0400 Subject: [PATCH 2/3] CC-4579: Edit Metadata: Track number defaults to 0 if it is deleted -fixed --- airtime_mvc/application/models/StoredFile.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index cd75da2d1..2300f4eb7 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -196,6 +196,10 @@ class Application_Model_StoredFile if (isset($this->_dbMD[$dbColumn])) { $propelColumn = $this->_dbMD[$dbColumn]; $method = "set$propelColumn"; + + /* We need to set track_number to null if it is an empty string + * because propel defaults empty strings to zeros */ + if ($dbColumn == "track_number" && empty($mdValue)) $mdValue = null; $this->_file->$method($mdValue); } } From 2b1db835dd6448b229f38dada3bf0a1d033733fb Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 16 Oct 2012 16:01:05 -0400 Subject: [PATCH 3/3] CC-4571: Now Playing delete action does not delete, should be labelled 'Remove from show' -done --- .../application/controllers/ShowbuilderController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/controllers/ShowbuilderController.php b/airtime_mvc/application/controllers/ShowbuilderController.php index 23c3fd55b..a31119cdb 100644 --- a/airtime_mvc/application/controllers/ShowbuilderController.php +++ b/airtime_mvc/application/controllers/ShowbuilderController.php @@ -186,13 +186,13 @@ class ShowbuilderController extends Zend_Controller_Action $menu["preview"] = array("name"=> "Preview", "icon" => "play"); //select the cursor - $menu["selCurs"] = array("name"=> "Select Cursor","icon" => "select-cursor"); - $menu["delCurs"] = array("name"=> "Remove Cursor","icon" => "select-cursor"); + $menu["selCurs"] = array("name"=> "Select cursor","icon" => "select-cursor"); + $menu["delCurs"] = array("name"=> "Remove cursor","icon" => "select-cursor"); if ($now < floatval($item->getDbEnds("U.u")) && $user->canSchedule($instance->getDbShowId())) { //remove/truncate the item from the schedule - $menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => "/showbuilder/schedule-remove"); + $menu["del"] = array("name"=> "Remove from show", "icon" => "delete", "url" => "/showbuilder/schedule-remove"); } $this->view->items = $menu;