From ab90b045c030fb28aff0f180250c11cc82d08174 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 20 Sep 2013 16:07:57 +0200 Subject: [PATCH] [FIX #662] IDLE Worker False Positives --- public/include/classes/worker.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/include/classes/worker.class.php b/public/include/classes/worker.class.php index 88999e1c..551e47f7 100644 --- a/public/include/classes/worker.class.php +++ b/public/include/classes/worker.class.php @@ -78,7 +78,7 @@ class Worker { FROM " . $this->table . " AS w WHERE monitor = 1 AND ( - SELECT IFNULL(SIGN(IF(our_result = 'Y', COUNT(id), 0)), 0) FROM " . $this->share->getTableName() . " WHERE username = w.username AND time > DATE_SUB(now(), INTERVAL 10 MINUTE) + SELECT IFNULL(SUM(IF(our_result = 'Y', 1, 0)), 0) FROM " . $this->share->getTableName() . " WHERE username = w.username AND time > DATE_SUB(now(), INTERVAL 10 MINUTE) ) = 0"); if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result()) return $result->fetch_all(MYSQLI_ASSOC);