From 45fa1efc2df1139aef35a0603c9fbc800b6188c3 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 19 Apr 2012 12:56:15 -0400 Subject: [PATCH 1/2] CC-3603: Calendar->Once you update the rebroadcasted show it disappears - fixed --- airtime_mvc/application/models/Show.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 015c12bcc..cb9a446e6 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1265,9 +1265,7 @@ class Application_Model_Show { Logging::log('$start time of non repeating record '.$start); - if ($newInstance){ - self::createRebroadcastInstances($rebroadcasts, $currentUtcTimestamp, $show_id, $show_instance_id, $start, $duration, $timezone); - } + self::createRebroadcastInstances($rebroadcasts, $currentUtcTimestamp, $show_id, $show_instance_id, $start, $duration, $timezone); } } From ee7829d920e1f579aec5e1b0433110d5e6d70066 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 19 Apr 2012 12:57:13 -0400 Subject: [PATCH 2/2] CC-3663: Cannot edit rebroadcast show -fixed --- .../controllers/ScheduleController.php | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index ff9b73a8b..d1ebe0721 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -441,7 +441,9 @@ class ScheduleController extends Zend_Controller_Action unset($this->view->showContent); } - public function populateShowInstanceFormAction(){ + // we removed edit show instance option in menu item + // this feature is disabled in 2.1 and should be back in 2.2 + /*public function populateShowInstanceFormAction(){ $formWhat = new Application_Form_AddShowWhat(); $formWho = new Application_Form_AddShowWho(); $formWhen = new Application_Form_AddShowWhen(); @@ -498,15 +500,15 @@ class ScheduleController extends Zend_Controller_Action $formRepeats->disable(); $formStyle->disable(); - /* - $formRecord->disable(); - $formAbsoluteRebroadcast->disable(); - $formRebroadcast->disable(); - */ + + //$formRecord->disable(); + //$formAbsoluteRebroadcast->disable(); + //$formRebroadcast->disable(); + $this->view->action = "edit-show-instance"; $this->view->newForm = $this->view->render('schedule/add-show-form.phtml'); - } + }*/ public function populateShowFormAction() { @@ -520,12 +522,12 @@ class ScheduleController extends Zend_Controller_Action // repeating shows. It's value is either "instance","rebroadcast", or "all" $type = $this->_getParam('type'); - if($type == "rebroadcast") { - $this->view->action = "edit-show-rebroadcast"; + /*if($type == "rebroadcast") { + //$this->view->action = "edit-show-rebroadcast"; } else { $this->view->action = "edit-show"; - } - + }*/ + $this->view->action = "edit-show"; try{ $showInstance = new Application_Model_ShowInstance($showInstanceId); }catch(Exception $e){ @@ -679,10 +681,6 @@ class ScheduleController extends Zend_Controller_Action $formRepeats->disable(); $formStyle->disable(); } - - if($type == "rebroadcast"){ - $formWhen->disable(); - } $this->view->newForm = $this->view->render('schedule/add-show-form.phtml'); $this->view->entries = 5; @@ -777,6 +775,7 @@ class ScheduleController extends Zend_Controller_Action if (!array_key_exists('add_show_start_time', $data)){ $startTime = Application_Common_DateHelper::ConvertToLocalDateTime($show->getStartTime()); $data['add_show_start_time'] = $startTime->format("H:i"); + $validateStartTime = false; } $validateStartDate = false; } @@ -791,6 +790,9 @@ class ScheduleController extends Zend_Controller_Action if (!$validateStartDate){ $this->view->when->getElement('add_show_start_date')->setOptions(array('disabled' => true)); } + if(!$validateStartTime){ + $this->view->when->getElement('add_show_start_time')->setOptions(array('disabled' => true)); + } $this->view->rr->getElement('add_show_record')->setOptions(array('disabled' => true)); $this->view->addNewShow = false; $this->view->form = $this->view->render('schedule/add-show-form.phtml');