CC-5075: Future bi-weekly linked shows don't get filled with content sometimes

This commit is contained in:
denise 2013-05-02 11:40:56 -04:00
parent 09754b20cc
commit ea73d98c49
1 changed files with 7 additions and 5 deletions

View File

@ -183,6 +183,9 @@ class Application_Service_ShowService
if (is_null($this->ccShow)) { if (is_null($this->ccShow)) {
$ccShowDays = $this->getShowDaysInRange($populateUntil, $end); $ccShowDays = $this->getShowDaysInRange($populateUntil, $end);
if (count($ccShowDays) > 0) {
$this->ccShow = $ccShowDays[0]->getCcShow();
}
} else { } else {
$ccShowDays = $this->ccShow->getCcShowDays(); $ccShowDays = $this->ccShow->getCcShowDays();
} }
@ -214,6 +217,10 @@ class Application_Service_ShowService
} }
} }
if (isset($this->ccShow) && $fillInstances) {
Application_Service_SchedulerService::fillLinkedShows(
$this->ccShow);
}
return $this->ccShow; return $this->ccShow;
} }
@ -901,11 +908,6 @@ SQL;
$utcStartDateTime->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone())); $utcStartDateTime->setTimezone(new DateTimeZone(Application_Model_Preference::GetTimezone()));
$nextDate = $utcStartDateTime->add($repeatInterval); $nextDate = $utcStartDateTime->add($repeatInterval);
$this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id); $this->setNextRepeatingShowDate($nextDate->format("Y-m-d"), $day, $show_id);
if ($fillInstances) {
Application_Service_SchedulerService::fillLinkedShows(
$showDay->getCcShow());
}
} }
private function createMonthlyMonthlyRepeatInstances($showDay, $populateUntil) private function createMonthlyMonthlyRepeatInstances($showDay, $populateUntil)