Code Duplication    Length = 4-4 lines in 3 locations

ecrire/public/criteres.php 3 locations

@@ 339-342 (lines=4) @@
336
		return;
337
	}
338
339
	if (isset($crit->param[0])) {
340
		$quoi = calculer_liste($crit->param[0], array(), $boucles, $boucles[$idb]->id_parent);
341
	} else {
342
		$quoi = '(isset($Pile[0]["recherche"])?$Pile[0]["recherche"]:(isset($GLOBALS["recherche"])?$GLOBALS["recherche"]:""))';
343
	}
344
345
	$_modificateur = var_export($boucle->modificateur, true);
@@ 1061-1064 (lines=4) @@
1058
	} else {
1059
		$order = "' DESC'";
1060
		// Classement par ordre inverse fonction eventuelle de #ENV{...}
1061
		if (isset($crit->param[0])) {
1062
			$critere = calculer_liste($crit->param[0], array(), $boucles, $boucles[$idb]->id_parent);
1063
			$order = "(($critere)?' DESC':'')";
1064
		}
1065
1066
		$n = count($boucle->order);
1067
		if (!$n) {
@@ 1563-1566 (lines=4) @@
1560
 */
1561
function critere_where_dist($idb, &$boucles, $crit) {
1562
	$boucle = &$boucles[$idb];
1563
	if (isset($crit->param[0])) {
1564
		$_where = calculer_liste($crit->param[0], array(), $boucles, $boucle->id_parent);
1565
	} else {
1566
		$_where = '@$Pile[0]["where"]';
1567
	}
1568
1569
	if ($crit->cond) {