Code Duplication    Length = 4-4 lines in 4 locations

programs/init.php 3 locations

@@ 153-156 (lines=4) @@
150
	// correction des demandes n'ayant pas de date de creation
151
	
152
	$res = $babDB->db_query("SELECT `id`, `date` FROM absences_entries WHERE createdOn='0000-00-00 00:00:00'");
153
	while ($arr = $babDB->db_fetch_assoc($res))
154
	{
155
		$babDB->db_query("UPDATE absences_entries SET createdOn=".$babDB->quote($arr['date'])." WHERE id=".$babDB->quote($arr['id']));
156
	}
157
	
158
	$typescount = 0;
159
	$res = $babDB->db_query('SELECT COUNT(*) FROM '.$babDB->backTick('absences_types'));
@@ 255-258 (lines=4) @@
252
	
253
	require_once $GLOBALS['babInstallPath'].'utilit/uuid.php';
254
	$res = $babDB->db_query("SELECT id FROM absences_rights WHERE uuid=''");
255
	while ($arr = $babDB->db_fetch_assoc($res))
256
	{
257
		$babDB->db_query('UPDATE absences_rights SET uuid='.$babDB->quote(bab_uuid()).' WHERE id='.$babDB->quote($arr['id']));
258
	}
259
	
260
	$res = $babDB->db_query("SELECT id FROM absences_rights_inperiod WHERE uuid=''");
261
	while ($arr = $babDB->db_fetch_assoc($res))
@@ 261-264 (lines=4) @@
258
	}
259
	
260
	$res = $babDB->db_query("SELECT id FROM absences_rights_inperiod WHERE uuid=''");
261
	while ($arr = $babDB->db_fetch_assoc($res))
262
	{
263
		$babDB->db_query('UPDATE absences_rights_inperiod SET uuid='.$babDB->quote(bab_uuid()).' WHERE id='.$babDB->quote($arr['id']));
264
	}
265
	
266
	
267
	// reprise des gestionnaires en tant que groupe avec ACL, faire la reprise si la table absences_options contient des lignes

programs/utilit/rightincl.php 1 location

@@ 324-327 (lines=4) @@
321
		// recopier les liens droit-regime
322
		
323
		$res = $babDB->db_query('SELECT * FROM absences_coll_rights WHERE id_right='.$babDB->quote($old_id_right));
324
		while ($arr = $babDB->db_fetch_assoc($res))
325
		{
326
			$babDB->db_query('INSERT INTO absences_coll_rights (id_coll, id_right) VALUES ('.$babDB->quote($arr['id_coll']).', '.$babDB->quote($new_id_right).')');
327
		}
328
		
329
		
330