From 81ee30105d6903450aee05ee9940d2fe65f65adf Mon Sep 17 00:00:00 2001 From: Naomi Date: Thu, 26 May 2011 16:27:50 -0400 Subject: [PATCH] CC-2326 Can't edit a show more than once (End Date problems) keep adding the 1 day interval here --- airtime_mvc/application/models/Shows.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/models/Shows.php b/airtime_mvc/application/models/Shows.php index e2911129e..c83463b44 100644 --- a/airtime_mvc/application/models/Shows.php +++ b/airtime_mvc/application/models/Shows.php @@ -626,16 +626,16 @@ class Show { $endDate = NULL; } else if ($data['add_show_repeats']) { - //$sql = "SELECT date '{$data['add_show_end_date']}' + INTERVAL '1 day' "; - //$r = $con->query($sql); - //$endDate = $r->fetchColumn(0); - $endDate = $data['add_show_end_date']; + $sql = "SELECT date '{$data['add_show_end_date']}' + INTERVAL '1 day' "; + $r = $con->query($sql); + $endDate = $r->fetchColumn(0); + //$endDate = $data['add_show_end_date']; } else { - //$sql = "SELECT date '{$data['add_show_start_date']}' + INTERVAL '1 day' "; - //$r = $con->query($sql); - //$endDate = $r->fetchColumn(0); - $endDate = $data['add_show_start_date']; + $sql = "SELECT date '{$data['add_show_start_date']}' + INTERVAL '1 day' "; + $r = $con->query($sql); + $endDate = $r->fetchColumn(0); + //$endDate = $data['add_show_start_date']; } //only want the day of the week from the start date.