From 77e1c1c0cbc103eebcecd424776cd914d49779d1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 16 Mar 2012 17:13:32 -0400 Subject: [PATCH] CC-3466: Select statement for Now Playing has 'AND' in statement when no shows scheduled. -added check to make the code do nothing when a previous, current and next show id aren't specified. --- airtime_mvc/application/models/Schedule.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index 2afad25f5..2fe7b576f 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -92,6 +92,9 @@ class Application_Model_Schedule { **/ public static function GetPrevCurrentNext($p_previousShowID, $p_currentShowID, $p_nextShowID, $p_timeNow) { + if ($p_previousShowID == null && $p_currentShowID == null && $p_nextShowID == null) + return; + global $CC_CONFIG, $CC_DBC; $sql = 'Select ft.artist_name, ft.track_title, st.starts as starts, st.ends as ends, st.media_item_played as media_item_played FROM cc_schedule st LEFT JOIN cc_files ft ON st.file_id = ft.id