web: check UOTD email addr

This commit is contained in:
David Anderson 2014-06-17 22:20:26 -07:00
parent f2030ca9a7
commit 6553333002
1 changed files with 4 additions and 1 deletions

View File

@ -81,7 +81,10 @@ function select_uotd() {
// If the number of approved profiles dips below a threshold,
// email the sys admin every time we pick a new one.
//
if ($result && mysql_num_rows($result) < UOTD_THRESHOLD) {
if (defined('UOTD_ADMIN_EMAIL')
&& $result
&& mysql_num_rows($result) < UOTD_THRESHOLD
) {
$u = new BoincUser;
$u->email_addr = UOTD_ADMIN_EMAIL;
$u->name = "UOTD admin";