Code Duplication    Length = 6-6 lines in 2 locations

ecrire/public/criteres.php 2 locations

@@ 793-798 (lines=6) @@
790
		if ($where_complement) // condition annexe du type "AND (objet='article')"
791
			$where_complement = array("'?'",$pred,	$where_complement,"''");
792
	}
793
	if ($crit->exclus)
794
		if (!preg_match(",^L[0-9]+[.],",$arg))
795
			$where = array("'NOT'", $where);
796
		else
797
			// un not sur un critere de jointure se traduit comme un NOT IN avec une sous requete
798
			$where = array("'NOT'",array("'IN'","'".$boucles[$idb]->id_table.".".$boucles[$idb]->primary."'" ,array("'SELF'","'".$boucles[$idb]->id_table.".".$boucles[$idb]->primary."'",$where)));
799
800
	$boucles[$idb]->where[] = $where;
801
	if ($where_complement) // condition annexe du type "AND (objet='article')"
@@ 868-873 (lines=6) @@
865
	// inserer la negation (cf !...)
866
867
	if ($crit->not) $where = array("'NOT'", $where);
868
	if ($crit->exclus) 
869
		if (!preg_match(",^L[0-9]+[.],",$arg))
870
			$where = array("'NOT'", $where);
871
		else
872
			// un not sur un critere de jointure se traduit comme un NOT IN avec une sous requete
873
			$where = array("'NOT'",array("'IN'","'".$boucles[$idb]->id_table.".".$boucles[$idb]->primary."'" ,array("'SELF'","'".$boucles[$idb]->id_table.".".$boucles[$idb]->primary."'",$where)));
874
875
	// inserer la condition (cf {lang?})
876
	// traiter a part la date, elle est mise d'office par SPIP,