From 13e3197ebfe5ff1ba0f3b8c8d82811568fdb3a8d Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 13 Mar 2012 11:31:24 -0400 Subject: [PATCH] CC-3423: nowPlaying getCurrentPlaylist doesn't work for next song - added brackets to an statement --- 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 6c3730bcf..5abee1f36 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -71,11 +71,12 @@ class Application_Model_Schedule { "schedulerTime"=>$timeNow, "previous"=>isset($results['previous'])?$results['previous']:count($shows['previousShow'])>0?$shows['previousShow'][0]:null, "current"=>isset($results['current'])?$results['current']:null, - "next"=> isset($results['next'])?$results['next']:count($shows['nextShow'])>0?$shows['nextShow'][0]:null, + "next"=> isset($results['next'])?$results['next']:(count($shows['nextShow'])>0?$shows['nextShow'][0]:null), "currentShow"=>$shows['currentShow'], "nextShow"=>$shows['nextShow'], "timezone"=> date("T"), "timezoneOffset"=> date("Z")); + return $range; } @@ -120,6 +121,7 @@ class Application_Model_Schedule { "ends"=>$rows[$i]["ends"], "media_item_played"=>$rows[$i]["media_item_played"], "record"=>0); + if ( isset($rows[$i+1])){ $results['next'] = array("name"=>$rows[$i+1]["artist_name"]." - ".$rows[$i+1]["track_title"], "starts"=>$rows[$i+1]["starts"], @@ -139,7 +141,6 @@ class Application_Model_Schedule { break; } } - return $results; }