mirror of https://github.com/BOINC/boinc.git
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:
parent
115cfd2054
commit
f8c531599c
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue