CC-2265: Date Start is not updated after dragging show to new day

- fixed
This commit is contained in:
james 2011-09-07 17:30:25 -04:00
parent 03efb8f293
commit b73016550b
2 changed files with 27 additions and 2 deletions

View File

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

View File

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