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

@@ 1822-1832 (lines=11) @@
1819
		return $year;
1820
	}
1821
1822
	public function archive()
1823
	{
1824
		global $babDB;
1825
1826
		$babDB->db_query("
1827
			UPDATE absences_entries
1828
			SET archived=".$babDB->quote(1)."
1829
			WHERE
1830
				id=".$babDB->quote($this->id)."
1831
		");
1832
	}
1833
1834
1835
	public function setNotified()
@@ 1835-1850 (lines=16) @@
1832
	}
1833
1834
1835
	public function setNotified()
1836
	{
1837
		global $babDB;
1838
1839
		if (!$this->id)
1840
		{
1841
			throw new Exception('Missing ID');
1842
		}
1843
1844
		$babDB->db_query("
1845
			UPDATE absences_entries
1846
				SET appr_notified=".$babDB->quote(1)."
1847
			WHERE
1848
				id=".$babDB->quote($this->id)."
1849
		");
1850
	}
1851
1852
1853
	public function getManagerEditUrl()