Code Duplication    Length = 9-13 lines in 2 locations

programs/utilit/vacincl.php 1 location

@@ 1046-1058 (lines=13) @@
1043
			");
1044
			$worked_ids[] = $users_rights[$id_right];
1045
		}
1046
		else
1047
		{
1048
			$babDB->db_query("INSERT INTO ".ABSENCES_USERS_RIGHTS_TBL." 
1049
			        (id_user,id_right,quantity, renewal) 
1050
			VALUES 
1051
			        (
1052
			            '".$babDB->db_escape_string($_POST['idp'])."', 
1053
			            '".$babDB->db_escape_string($id_right)."', 
1054
			            '".$babDB->db_escape_string($user_quantity)."',
1055
			            ".$babDB->quote($renewal)."
1056
			       )");
1057
			$worked_ids[] = $babDB->db_insert_id();
1058
		}
1059
	}
1060
1061
	if (count($worked_ids) > 0)

programs/vacadm.php 1 location

@@ 852-860 (lines=9) @@
849
						'%s has not been modified because of %d waiting request',
850
						'%s has not been modified because of %d waiting requests', $wr ), $agent->getName(), $wr) , BAB_HTML_ALL);
851
852
				} else {
853
854
					// modification d'un membre du personnel qui n'a pas de demande en attente
855
					$babDB->db_query("update ".ABSENCES_PERSONNEL_TBL." set
856
						id_sa='".$babDB->db_escape_string($idsa)."',
857
						id_sa_cet=".$babDB->quote($id_sa_cet).",
858
						id_sa_recover=".$babDB->quote($id_sa_recover)."
859
					WHERE id_user=".$babDB->quote($user['id']));
860
				}
861
			}
862
		}
863
		else if (!$agent->exists() && $addmodify == 'add')