diff --git a/airtime_mvc/application/services/ShowInstanceService.php b/airtime_mvc/application/services/ShowInstanceService.php index 1c0cf13e7..1e1eeb0f4 100644 --- a/airtime_mvc/application/services/ShowInstanceService.php +++ b/airtime_mvc/application/services/ShowInstanceService.php @@ -134,6 +134,7 @@ class Application_Service_ShowInstanceService } } } + $this->service_show->setNextPopulateUntilDate($nextDate, $show_id, $day); } /** diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 05eb309af..13605963d 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -226,4 +226,17 @@ class Application_Service_ShowService return array($startDateTime, $endDateTime); } + + public function setNextPopulateUntilDate($nextDate, $showId, $day) + { + $nextInfo = explode(" ", $nextDate); + + $repeatInfo = CcShowDaysQuery::create() + ->filterByDbShowId($showId) + ->filterByDbDay($day) + ->findOne(); + + $repeatInfo->setDbNextPopDate($nextInfo[0]) + ->save(); + } } \ No newline at end of file