Merge branch '2.2.x' of dev.sourcefabric.org:airtime into 2.2.x

This commit is contained in:
James 2012-10-16 16:24:12 -04:00
commit 35c8fe55b4
3 changed files with 8 additions and 6 deletions

View File

@ -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;

View File

@ -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

View File

@ -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);
}
}