Code Duplication    Length = 3-6 lines in 2 locations

programs/utilit/statistics.class.php 1 location

@@ 160-162 (lines=3) @@
157
		$types = array();
158
159
		$organization = '';
160
		if(isset($this->filter['organization']) && $this->filter['organization']){
161
			$organization = 'AND p.id_organization='.$babDB->quote($this->filter['organization']);
162
		}
163
164
		$res = $babDB->db_query('
165
			SELECT

programs/utilit/entry.class.php 1 location

@@ 2331-2336 (lines=6) @@
2328
	        $where[] = 'YEAR(e.date_begin)='.$babDB->quote($this->year);
2329
	    }
2330
	    
2331
	    if (isset($this->organization) && $this->organization)
2332
	    {
2333
	        $req .= ', absences_personnel p';
2334
	        $where[] = 'e.id_user=p.id_user';
2335
	        $where[] = 'p.id_organization='.$babDB->quote($this->organization);
2336
	    }
2337
	    
2338
	    if (isset($this->archived))
2339
	    {