Web: more restrictive get_current_uotd()

This will prevent the rare case where a project has not yet chosen a UOTD but there are profiles in the DB (a random profile would be shown).
This commit is contained in:
Christian Beer 2015-12-07 16:32:15 +01:00
parent 115cfd2054
commit f8c531599c
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ function show_uotd($profile) {
// return the last UOTD profile, or null
//
function get_current_uotd() {
$profiles = BoincProfile::enum(null, "ORDER BY uotd_time DESC LIMIT 1");
$profiles = BoincProfile::enum("uotd_time is not NULL", "ORDER BY uotd_time DESC LIMIT 1");
if (sizeof($profiles)) {
return $profiles[0];
}