From 5111f7449487a14c753c033ec262afcbdf2dffb1 Mon Sep 17 00:00:00 2001 From: denise Date: Fri, 8 Mar 2013 12:17:55 -0500 Subject: [PATCH] Created function to set the next populate until date for repeating shows --- .../application/services/ShowInstanceService.php | 1 + airtime_mvc/application/services/ShowService.php | 13 +++++++++++++ 2 files changed, 14 insertions(+) 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