Code Duplication    Length = 11-16 lines in 6 locations

programs/utilit/cet_deposit_request.class.php 2 locations

@@ 349-360 (lines=12) @@
346
	
347
	
348
	
349
	public function archive()
350
	{
351
		global $babDB;
352
	
353
		$babDB->db_query("
354
			UPDATE absences_cet_deposit_request 
355
			SET 
356
				archived=".$babDB->quote(1)."
357
			WHERE 
358
				id=".$babDB->quote($this->id)."
359
		");
360
	}
361
	
362
	
363
	
@@ 364-375 (lines=12) @@
361
	
362
	
363
	
364
	public function setNotified()
365
	{
366
		global $babDB;
367
	
368
		$babDB->db_query("
369
			UPDATE absences_cet_deposit_request
370
			SET 
371
				appr_notified=".$babDB->quote(1)."
372
			WHERE 
373
				id=".$babDB->quote($this->id)."
374
		");
375
	}
376
	
377
	
378
	public function getManagerEditUrl()

programs/utilit/workperiod_recover_request.class.php 2 locations

@@ 454-465 (lines=12) @@
451
	}
452
	
453
	
454
	public function archive()
455
	{
456
		global $babDB;
457
	
458
		$babDB->db_query("
459
			UPDATE absences_workperiod_recover_request 
460
			SET
461
				archived=".$babDB->quote(1)."
462
			WHERE
463
				id=".$babDB->quote($this->id)."
464
		");
465
	}
466
	
467
	
468
	
@@ 469-480 (lines=12) @@
466
	
467
	
468
	
469
	public function setNotified()
470
	{
471
		global $babDB;
472
	
473
		$babDB->db_query("
474
			UPDATE absences_workperiod_recover_request
475
			SET
476
				appr_notified=".$babDB->quote(1)."
477
			WHERE
478
				id=".$babDB->quote($this->id)."
479
				");
480
	}
481
	
482
	
483
	public function getManagerEditUrl()

programs/utilit/entry.class.php 2 locations

@@ 2176-2186 (lines=11) @@
2173
		return $year;
2174
	}
2175
2176
	public function archive()
2177
	{
2178
		global $babDB;
2179
2180
		$babDB->db_query("
2181
			UPDATE absences_entries
2182
			SET archived=".$babDB->quote(1)."
2183
			WHERE
2184
				id=".$babDB->quote($this->id)."
2185
		");
2186
	}
2187
2188
2189
	public function setNotified()
@@ 2189-2204 (lines=16) @@
2186
	}
2187
2188
2189
	public function setNotified()
2190
	{
2191
		global $babDB;
2192
2193
		if (!$this->id)
2194
		{
2195
			throw new Exception('Missing ID');
2196
		}
2197
2198
		$babDB->db_query("
2199
			UPDATE absences_entries
2200
				SET appr_notified=".$babDB->quote(1)."
2201
			WHERE
2202
				id=".$babDB->quote($this->id)."
2203
		");
2204
	}
2205
2206
2207
	public function getManagerEditUrl()