CC-2265: Date Start is not updated after dragging show to new day
- fixed
This commit is contained in:
parent
03efb8f293
commit
b73016550b
|
@ -87,8 +87,8 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$user = new User($userInfo->id);
|
||||
|
||||
if($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
|
||||
$show = new ShowInstance($showInstanceId);
|
||||
$error = $show->moveShow($deltaDay, $deltaMin);
|
||||
$showInstance = new ShowInstance($showInstanceId);
|
||||
$error = $showInstance->moveShow($deltaDay, $deltaMin);
|
||||
}
|
||||
|
||||
if(isset($error))
|
||||
|
|
|
@ -1262,6 +1262,24 @@ class Show {
|
|||
|
||||
return $event;
|
||||
}
|
||||
|
||||
public function setShowFirstShow($s_date){
|
||||
$showDay = CcShowDaysQuery::create()
|
||||
->filterByDbShowId($this->_showId)
|
||||
->findOne();
|
||||
|
||||
$showDay->setDbFirstShow($s_date)
|
||||
->save();
|
||||
}
|
||||
|
||||
public function setShowLastShow($e_date){
|
||||
$showDay = CcShowDaysQuery::create()
|
||||
->filterByDbShowId($this->_showId)
|
||||
->findOne();
|
||||
|
||||
$showDay->setDbLastShow($e_date)
|
||||
->save();
|
||||
}
|
||||
}
|
||||
|
||||
class ShowInstance {
|
||||
|
@ -1464,6 +1482,13 @@ class ShowInstance {
|
|||
$this->setShowStart($new_starts);
|
||||
$this->setShowEnd($new_ends);
|
||||
$this->correctScheduleStartTimes();
|
||||
|
||||
$show = new Show($this->getShowId());
|
||||
if(!$show->isRepeating()){
|
||||
$show->setShowFirstShow($new_starts);
|
||||
$show->setShowLastShow($new_ends);
|
||||
}
|
||||
|
||||
RabbitMq::PushSchedule();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue