CC-5724: Changing start date of a repeating show will update content incorrectly

This commit is contained in:
drigato 2014-03-05 14:37:07 -05:00
parent ebc68b980c
commit 426b75b635
1 changed files with 8 additions and 5 deletions

View File

@ -221,12 +221,15 @@ class Application_Service_ShowService
$this->delegateInstanceCreation($daysAdded); $this->delegateInstanceCreation($daysAdded);
if ($this->isUpdate) { if ($this->isUpdate) {
/* Set the show's start date to the start date of the first instance.
* We need to do this so we get the correct time diff for /* If the show is repeating and the start date changes we need
* updating show content. CC-5696 * to ignore that difference when re-calculating schedule start times.
* Otherwise it might calculate a difference of a week, for example.
*/ */
//$showData["add_show_start_date"] = $this->ccShow->getFirstCcShowDay()->getDbFirstShow(); if ($this->ccShow->isRepeating() &&
//$showData["add_show_start_time"] = $this->ccShow->getFirstCcShowDay()->getDbStartTime(); $this->origCcShowDay->getLocalStartDateAndTime()->format("Y-m-d") != $showData["add_show_start_date"]) {
$showData["add_show_start_date"] = $this->origCcShowDay->getLocalStartDateAndTime()->format("Y-m-d");
}
$this->adjustSchedule($showData); $this->adjustSchedule($showData);
} }