Permalink
Browse files

fix fetch result test

  • Loading branch information...
RocketMan committed Jul 22, 2018
1 parent b3ce745 commit 62412f5b3aa065c26b40d1804ee33f2ac7659cb6
Showing with 18 additions and 5 deletions.
  1. +11 −0 assets/.htaccess
  2. +5 −3 ui/Charts.php
  3. +2 −2 ui/Playlists.php
@@ -0,0 +1,11 @@
# apache 2.4
<ifModule mod_authz_core>
Require all denied
</ifModule>
# apache 2.2
<ifModule !mod_authz_core>
deny from all
</ifModule>
IndexIgnore *
@@ -118,9 +118,11 @@ public function chartWeekly() {
// current year
$today = getdate(time());
$years = $chartAPI->getChartYears();
$yearrec = $years->fetch();
$year = $yearrec[0];
////$year = $today["year"];
if($years) {
$yearrec = $years->fetch();
$year = $yearrec[0];
} else
$year = $today["year"];
$month = $today["mon"];
}
@@ -1495,7 +1495,7 @@ public function emitViewDJMain() {
// Run the query
$records = Engine::api(IDJ::class)->getActiveAirnames($this->subaction == "viewAll");
$i = 0;
while($row = $records->fetch()) {
while($records && ($row = $records->fetch())) {
$row["sort"] = preg_match("/^the /i", $row[1])?substr($row[1], 4):$row[1];
$dj[$i++] = $row;
}
@@ -1557,7 +1557,7 @@ public function emitViewDate() {
// Run the query
$records = Engine::api(IPlaylist::class)->getShowdates($year, $month);
unset($dates);
while($row = $records->fetch())
while($records && ($row = $records->fetch()))
$dates .= $row['showdate'] . "|";
// Display the calendar

0 comments on commit 62412f5

Please sign in to comment.