diff options
author | Thomas Willingham <founder@kakste.com> | 2013-10-10 21:24:04 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2013-10-10 21:24:04 +0100 |
commit | bcf211e9dcc71248ff4e06e4f80ad1b8b27a4df7 (patch) | |
tree | 7d94dc645b14986788cf5bffbb7161957321dcc9 /boot.php | |
parent | 6d85acc4134bccf47c847709f3b27fe6e663b064 (diff) | |
download | volse-hubzilla-bcf211e9dcc71248ff4e06e4f80ad1b8b27a4df7.tar.gz volse-hubzilla-bcf211e9dcc71248ff4e06e4f80ad1b8b27a4df7.tar.bz2 volse-hubzilla-bcf211e9dcc71248ff4e06e4f80ad1b8b27a4df7.zip |
Don't send a quintillion emails every time mysql restarts.
Diffstat (limited to 'boot.php')
-rwxr-xr-x | boot.php | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1239,7 +1239,13 @@ function check_config(&$a) { $func = 'update_r' . $x; $retval = $func(); if($retval) { + // Prevent sending hundreds of thousands of emails by creating + // a lockfile. view/tpl/smarty3 is the only place we can + // guarantee the server can write to. + if (file_exists('view/tpl/smarty3/mailsent')) + return; //send the administrator an e-mail + file_put_contents('view/tpl/smarty3/mailsent', $x); $email_tpl = get_intltext_template("update_fail_eml.tpl"); $email_msg = replace_macros($email_tpl, array( |