Code Duplication    Length = 4-4 lines in 2 locations

programs/planning.php 1 location

@@ 522-525 (lines=4) @@
519
    global $babDB;
520
    $babDB->db_query("DELETE FROM ".ABSENCES_PLANNING_TBL." WHERE id_entity = ".$babDB->quote($ide));
521
522
    foreach ($userids as $uid)
523
    {
524
        $babDB->db_query("INSERT INTO ".ABSENCES_PLANNING_TBL." (id_user, id_entity) VALUES ('".$babDB->db_escape_string($uid)."','".$babDB->db_escape_string($ide)."')");
525
    }
526
    
527
    $agent = absences_Agent::getCurrentUser();
528
    if ($agent->isManager()) {

programs/vacchart.php 1 location

@@ 361-364 (lines=4) @@
358
	global $babDB;
359
	$babDB->db_query("DELETE FROM ".ABSENCES_COMANAGER_TBL." WHERE id_entity = ".$babDB->quote($ide));
360
361
	foreach ($userids as $uid)
362
	{
363
		$babDB->db_query("INSERT INTO ".ABSENCES_COMANAGER_TBL." (id_user, id_entity) VALUES ('".$babDB->db_escape_string($uid)."','".$babDB->db_escape_string($ide)."')");
364
	}
365
	
366
	header('location:'.absences_addon()->getUrl()."vacchart&idx=entities");
367
	exit;