Code Duplication    Length = 4-5 lines in 2 locations

programs/utilit/rightincl.php 1 location

@@ 314-318 (lines=5) @@
311
		
312
		
313
		$res = $babDB->db_query("SELECT * FROM absences_dynamic_configuration WHERE id_right=".$babDB->quote($old_id_right));
314
		while ($arr = $babDB->db_fetch_assoc($res))
315
		{
316
		    $babDB->db_query('INSERT INTO absences_dynamic_configuration (id_right, test_quantity, quantity) 
317
		        VALUES ('.$babDB->quote($new_id_right).', '.$babDB->quote($arr['test_quantity']).', '.$babDB->quote($arr['quantity']).')');
318
		}
319
		
320
		
321
		// recopier les liens droit-regime

programs/functions.php 1 location

@@ 281-284 (lines=4) @@
278
	    WHERE
279
	       e.status<>l.status
280
	    ");
281
    while ($arr = $babDB->db_fetch_assoc($res)) {
282
        bab_installWindow::message("Wrong status in movements history for $className ".$arr['id'].', fixing last movement');
283
        $babDB->db_query('UPDATE absences_movement SET status='.$babDB->quote($arr['status']).' WHERE id='.$babDB->quote($arr['movement']));
284
    }
285
}
286
287