CC-5997: Tracks get scheduled outside of the show start and end time

This commit is contained in:
drigato 2015-05-11 12:16:32 -04:00
parent 7676ec5643
commit 28997344fc
1 changed files with 16 additions and 1 deletions

View File

@ -240,7 +240,22 @@ class Application_Service_ShowService
$showData["add_show_start_date"] = $this->origCcShowDay->getLocalStartDateAndTime()->format("Y-m-d");
}
$this->adjustSchedule($showData);
// We don't want to adjust the cc_schedule times if ONLY the timezone has changed
// adjust schedule if the show time changed AND the timezone did not change
if ($this->oldShowTimezone == $showData["add_show_timezone"] &&
(substr($this->origCcShowDay->getDbStartTime(), 0, 5) != $showData["add_show_start_time"])) {
$this->adjustSchedule($showData);
}
// adjust the schedule if both the timezone changed AND the show time changed
if ($this->oldShowTimezone != $showData["add_show_timezone"] &&
(substr($this->origCcShowDay->getDbStartTime(), 0, 5) != $showData["add_show_start_time"])) {
$this->adjustSchedule($showData);
}
}
$con->commit();