Indentation and undefined variable fix in Block.php

This commit is contained in:
Albert Santoni 2015-01-27 15:39:21 -05:00
parent 0ba5452e03
commit 2b323400fc
1 changed files with 17 additions and 14 deletions

View File

@ -1521,6 +1521,7 @@ SQL;
// check if file exists
$qry->add("file_exists", "true", Criteria::EQUAL);
$qry->add("hidden", "false", Criteria::EQUAL);
$sortTracks = 'random';
if (isset($storedCrit['sort'])) {
$sortTracks = $storedCrit['sort']['value'];
}
@ -1530,8 +1531,10 @@ SQL;
else if ($sortTracks == 'oldest') {
$qry->addAscendingOrderByColumn('utime');
}
else {
else if ($sortTracks == 'random') {
$qry->addAscendingOrderByColumn('random()');
} else {
Logging::warning("Unimplemented sortTracks type in ".__FILE__);
}
}