From 14c670aa2035949d17587aaface0b8e50df705f0 Mon Sep 17 00:00:00 2001 From: drigato Date: Mon, 10 Mar 2014 17:41:57 -0400 Subject: [PATCH] CC-5728: Problem when removing repeat option and changing start date --- airtime_mvc/application/services/ShowService.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index de134f2fa..e71ecc568 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -463,6 +463,10 @@ SQL; if ($showData['add_show_repeats'] != $currentShowDay->isRepeating()) { $this->deleteAllRepeatInstances($currentShowDay, $showId); + if (!$showData["add_show_repeats"]) { + $this->deleteAllShowDays($showId); + } + //if repeat option was checked we need to treat the current show day //as a new show day so the repeat instances get created properly //in createWeeklyRepeatInstances() @@ -1573,6 +1577,7 @@ SQL; $keepDay = $day; $day = $this->origCcShowDay->getDbDay(); } + $showDay = CcShowDaysQuery::create() ->filterByDbShowId($showId) ->filterByDbRepeatType($this->origCcShowDay->getDbRepeatType())