From 0071caf94deccb823b6868f51860491ff1d821e4 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 22 Aug 2012 15:22:01 -0400 Subject: [PATCH] CC-4080: Calendar -> Cannot create show because there was a repeating show at same time before -fixed --- airtime_mvc/application/models/Schedule.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index f5f4ee501..43986c2e8 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -1065,10 +1065,11 @@ SQL; if ($update) { $sql = "SELECT id, starts, ends FROM ".$CC_CONFIG["showInstances"]." where ends <= '{$show_end->format('Y-m-d H:i:s')}' - and id != ".$instanceId. " order by ends"; + and modified_instance = false and id != ".$instanceId. " order by ends"; } else { $sql = "SELECT id, starts, ends FROM ".$CC_CONFIG["showInstances"]." - where ends <= '{$show_end->format('Y-m-d H:i:s')}' order by ends"; + where ends <= '{$show_end->format('Y-m-d H:i:s')}' + and modified_instance = false order by ends"; } $rows = $con->query($sql);