Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
1dd579d54e
airtime_mvc/application
|
@ -441,7 +441,9 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
unset($this->view->showContent);
|
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();
|
$formWhat = new Application_Form_AddShowWhat();
|
||||||
$formWho = new Application_Form_AddShowWho();
|
$formWho = new Application_Form_AddShowWho();
|
||||||
$formWhen = new Application_Form_AddShowWhen();
|
$formWhen = new Application_Form_AddShowWhen();
|
||||||
|
@ -498,15 +500,15 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$formRepeats->disable();
|
$formRepeats->disable();
|
||||||
$formStyle->disable();
|
$formStyle->disable();
|
||||||
|
|
||||||
/*
|
|
||||||
$formRecord->disable();
|
//$formRecord->disable();
|
||||||
$formAbsoluteRebroadcast->disable();
|
//$formAbsoluteRebroadcast->disable();
|
||||||
$formRebroadcast->disable();
|
//$formRebroadcast->disable();
|
||||||
*/
|
|
||||||
|
|
||||||
$this->view->action = "edit-show-instance";
|
$this->view->action = "edit-show-instance";
|
||||||
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
||||||
}
|
}*/
|
||||||
|
|
||||||
public function populateShowFormAction()
|
public function populateShowFormAction()
|
||||||
{
|
{
|
||||||
|
@ -520,12 +522,12 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
// repeating shows. It's value is either "instance","rebroadcast", or "all"
|
// repeating shows. It's value is either "instance","rebroadcast", or "all"
|
||||||
$type = $this->_getParam('type');
|
$type = $this->_getParam('type');
|
||||||
|
|
||||||
if($type == "rebroadcast") {
|
/*if($type == "rebroadcast") {
|
||||||
$this->view->action = "edit-show-rebroadcast";
|
//$this->view->action = "edit-show-rebroadcast";
|
||||||
} else {
|
} else {
|
||||||
$this->view->action = "edit-show";
|
$this->view->action = "edit-show";
|
||||||
}
|
}*/
|
||||||
|
$this->view->action = "edit-show";
|
||||||
try{
|
try{
|
||||||
$showInstance = new Application_Model_ShowInstance($showInstanceId);
|
$showInstance = new Application_Model_ShowInstance($showInstanceId);
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
|
@ -679,10 +681,6 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$formRepeats->disable();
|
$formRepeats->disable();
|
||||||
$formStyle->disable();
|
$formStyle->disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($type == "rebroadcast"){
|
|
||||||
$formWhen->disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
||||||
$this->view->entries = 5;
|
$this->view->entries = 5;
|
||||||
|
@ -777,6 +775,7 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
if (!array_key_exists('add_show_start_time', $data)){
|
if (!array_key_exists('add_show_start_time', $data)){
|
||||||
$startTime = Application_Common_DateHelper::ConvertToLocalDateTime($show->getStartTime());
|
$startTime = Application_Common_DateHelper::ConvertToLocalDateTime($show->getStartTime());
|
||||||
$data['add_show_start_time'] = $startTime->format("H:i");
|
$data['add_show_start_time'] = $startTime->format("H:i");
|
||||||
|
$validateStartTime = false;
|
||||||
}
|
}
|
||||||
$validateStartDate = false;
|
$validateStartDate = false;
|
||||||
}
|
}
|
||||||
|
@ -791,6 +790,9 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
if (!$validateStartDate){
|
if (!$validateStartDate){
|
||||||
$this->view->when->getElement('add_show_start_date')->setOptions(array('disabled' => true));
|
$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->rr->getElement('add_show_record')->setOptions(array('disabled' => true));
|
||||||
$this->view->addNewShow = false;
|
$this->view->addNewShow = false;
|
||||||
$this->view->form = $this->view->render('schedule/add-show-form.phtml');
|
$this->view->form = $this->view->render('schedule/add-show-form.phtml');
|
||||||
|
|
|
@ -1265,9 +1265,7 @@ class Application_Model_Show {
|
||||||
|
|
||||||
Logging::log('$start time of non repeating record '.$start);
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue