Formatted comments and =

This commit is contained in:
Rudi Grinberg 2012-09-13 15:12:54 -04:00
parent 410a3406af
commit f754d78687
1 changed files with 9 additions and 7 deletions
airtime_mvc/application/models

View File

@ -61,11 +61,13 @@ SQL;
} }
/** /**
* Queries the database for the set of schedules one hour before and after the given time. * Queries the database for the set of schedules one hour before
* If a show starts and ends within that time that is considered the current show. Then the * and after the given time. If a show starts and ends within that
* scheduled item before it is the previous show, and the scheduled item after it is the next * time that is considered the current show. Then the scheduled item
* show. This way the dashboard getCurrentPlaylist is very fast. But if any one of the three * before it is the previous show, and the scheduled item after it
* show types are not found through this mechanism a call is made to the old way of querying * is the next show. This way the dashboard getCurrentPlaylist is
* very fast. But if any one of the three show types are not found
* through this mechanism a call is made to the old way of querying
* the database to find the track info. * the database to find the track info.
**/ **/
public static function GetPrevCurrentNext($p_previousShowID, $p_currentShowID, $p_nextShowID, $p_timeNow) public static function GetPrevCurrentNext($p_previousShowID, $p_currentShowID, $p_nextShowID, $p_timeNow)
@ -118,8 +120,8 @@ SQL;
$numberOfRows = count($rows); $numberOfRows = count($rows);
$results['previous'] = null; $results['previous'] = null;
$results['current'] = null; $results['current'] = null;
$results['next'] = null; $results['next'] = null;
$timeNowAsMillis = strtotime($p_timeNow); $timeNowAsMillis = strtotime($p_timeNow);
for ($i = 0; $i < $numberOfRows; ++$i) { for ($i = 0; $i < $numberOfRows; ++$i) {