From f6854e447ba9d45638c0f3a905b6d131a26414fd Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 28 Sep 2007 04:06:44 +0100 Subject: fix hanged daemon notification --- functions.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 430525754..592272000 100644 --- a/functions.php +++ b/functions.php @@ -2702,23 +2702,24 @@ print ""; - if ($_SESSION["daemon_stamp_check"] + 600 < time()) { + if (time() - $_SESSION["daemon_stamp_check"] > 600) { $stamp = (int)read_stampfile("update_daemon.stamp"); if ($stamp) { - if ($stamp + 86400*3 < time()) { - print ""; + if (time() - $stamp > 86400) { + $stamp_check = 0; } else { - print ""; + $stamp_check = 1; + $_SESSION["daemon_stamp_check"] = time(); } + print ""; + $stamp_fmt = date("Y.m.d, G:i", $stamp); print ""; } - - $_SESSION["daemon_stamp_check"] = time(); } } -- cgit v1.2.3-54-g00ecf