From 2b659f9c9122b4d516d02ffda1f1b2aedc71513e Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 6 Sep 2012 16:16:53 -0400 Subject: [PATCH 1/3] Sexified. --- airtime_mvc/application/models/Schedule.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index 6abdaa94a..de8f4b975 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -861,12 +861,12 @@ SQL; $formStyle->disable(); //$formLive->disable(); - $controller->view->what = $formWhat; - $controller->view->when = $formWhen; + $controller->view->what = $formWhat; + $controller->view->when = $formWhen; $controller->view->repeats = $formRepeats; - $controller->view->who = $formWho; - $controller->view->style = $formStyle; - $controller->view->live = $formLive; + $controller->view->who = $formWho; + $controller->view->style = $formStyle; + $controller->view->live = $formLive; if (!$isSaas) { $controller->view->rr = $formRecord; $controller->view->absoluteRebroadcast = $formAbsoluteRebroadcast; From f30507fce63ea65cbb44c8015363269358f07350 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 6 Sep 2012 16:17:14 -0400 Subject: [PATCH 2/3] cc-4347: pdo --- airtime_mvc/application/models/Show.php | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 8018e4f6c..02a8bb7a0 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -803,12 +803,23 @@ SQL; ':add_show_id' => $p_data['add_show_id'] )); - $sql = "UPDATE cc_show_instances " - ."SET ends = starts + INTERVAL '$p_data[add_show_duration]' " - ."WHERE show_id = $p_data[add_show_id] " - ."AND ends > TIMESTAMP '$timestamp'"; - $con->exec($sql); - + // TODO : get rid of this + //$sql = "UPDATE cc_show_instances " + //."SET ends = starts + INTERVAL '$p_data[add_show_duration]' " + //."WHERE show_id = $p_data[add_show_id] " + //."AND ends > TIMESTAMP '$timestamp'"; + $sql = << TIMESTAMP :timestamp +SQL; + + Application_Common_Database::prepareAndExecute( $sql, + array( + ':add_show_duration' => $p_data['add_show_duration'], + ':show_id' => $p_data['add_show_id'], + ':timestamp' => $timestamp), "execute"); } private function updateStartDateTime($p_data, $p_endDate) From 73ba643563105ae9cb12d077a74b56daad0f13e4 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 6 Sep 2012 17:23:39 -0400 Subject: [PATCH 3/3] cc-4347: _-=~^PDO^~=-_ --- airtime_mvc/application/models/Show.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 02a8bb7a0..db23edea0 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -803,23 +803,19 @@ SQL; ':add_show_id' => $p_data['add_show_id'] )); - // TODO : get rid of this - //$sql = "UPDATE cc_show_instances " - //."SET ends = starts + INTERVAL '$p_data[add_show_duration]' " - //."WHERE show_id = $p_data[add_show_id] " - //."AND ends > TIMESTAMP '$timestamp'"; + $sql = << TIMESTAMP :timestamp +AND ends > :timestamp::TIMESTAMP SQL; + - Application_Common_Database::prepareAndExecute( $sql, - array( - ':add_show_duration' => $p_data['add_show_duration'], - ':show_id' => $p_data['add_show_id'], - ':timestamp' => $timestamp), "execute"); + Application_Common_Database::prepareAndExecute( $sql, array( + ':add_show_duration' => $p_data['add_show_duration'], + ':show_id' => $p_data['add_show_id'], + ':timestamp' => $timestamp), "execute"); } private function updateStartDateTime($p_data, $p_endDate)