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

@@ 2321-2326 (lines=6) @@
2318
				$where[] = 'YEAR(e.date_begin)='.$babDB->quote($this->year);
2319
			}
2320
2321
			if (isset($this->organization) && $this->organization)
2322
			{
2323
				$req .= ', absences_personnel p';
2324
				$where[] = 'e.id_user=p.id_user';
2325
				$where[] = 'p.id_organization='.$babDB->quote($this->organization);
2326
			}
2327
2328
			if (isset($this->archived))
2329
			{