From e1200808537b5035d2f28e57daf1962c93c17f94 Mon Sep 17 00:00:00 2001 From: Eike Foken Date: Fri, 16 Sep 2011 00:20:48 +0200 Subject: [PATCH] Add forgotten where clause for job counting --- application/models/job.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/models/job.php b/application/models/job.php index c08d2e5..f39fb97 100644 --- a/application/models/job.php +++ b/application/models/job.php @@ -153,6 +153,7 @@ class Job extends CI_Model { * @return integer */ public function countUnseenResults() { + $this->db->where('started_by', $this->session->userdata('user_id')); return $this->db->where(array('finished_at !=' => 0, 'seen' => 0))->count_all_results('jobs'); } @@ -162,6 +163,7 @@ class Job extends CI_Model { * @return integer */ public function countRunning() { + $this->db->where('started_by', $this->session->userdata('user_id')); return $this->db->where(array('started_at !=' => 0, 'finished_at' => 0))->count_all_results('jobs'); } @@ -171,6 +173,7 @@ class Job extends CI_Model { * @return integer */ public function countPending() { + $this->db->where('started_by', $this->session->userdata('user_id')); return $this->db->where('started_at', 0)->count_all_results('jobs'); } }