Code Duplication    Length = 4-4 lines in 2 locations

ecrire/inc/rubriques.php 2 locations

@@ 464-467 (lines=4) @@
461
		"A.id_parent = R.id_rubrique AND A.langue_choisie != 'oui' AND R.lang<>'' AND R.lang<>A.lang");
462
463
	$t = false;
464
	while ($row = sql_fetch($s)) {
465
		$id_rubrique = $row['id_rubrique'];
466
		$t = sql_updateq('spip_rubriques', array('lang' => $row['lang'], 'langue_choisie' => 'non'),
467
			"id_rubrique=" . intval($id_rubrique));
468
	}
469
470
	return $t;
@@ 500-503 (lines=4) @@
497
	// articles
498
	$s = sql_select("A.id_article AS id_article, R.lang AS lang", "spip_articles AS A, spip_rubriques AS R",
499
		"A.id_rubrique = R.id_rubrique AND A.langue_choisie != 'oui' AND (length(A.lang)=0 OR length(R.lang)>0) AND R.lang<>A.lang");
500
	while ($row = sql_fetch($s)) {
501
		$id_article = $row['id_article'];
502
		sql_updateq('spip_articles', array("lang" => $row['lang'], 'langue_choisie' => 'non'),
503
			"id_article=" . intval($id_article));
504
	}
505
506
	if ($GLOBALS['meta']['multi_rubriques'] == 'oui') {