From b1521d83ca8b803657311ddd9ef30386d0c6cfcb Mon Sep 17 00:00:00 2001
From: "Committo,Ergo:sum" <esj@rezo.net>
Date: Mon, 17 Oct 2005 12:03:25 +0000
Subject: [PATCH] pas de group by sur les jointures, ca met le bazar (JF
 Dancre)

---
 inc-criteres.php3 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/inc-criteres.php3 b/inc-criteres.php3
index 0e94a5e168..0996a45171 100644
--- a/inc-criteres.php3
+++ b/inc-criteres.php3
@@ -666,11 +666,15 @@ function calculer_critere_externe(&$boucle, $id_table, $lien, $join, $suite) {
 	$boucle->lien = true;
 	$boucle->from["L$num"] = $lien;
 	$boucle->join[] = "$id_field=L$num." . $join;
+	/* cette clause semble contradictoire avec un eventuel ORDER BY
+	 // cf http://article.gmane.org/gmane.comp.web.spip.devel/30497
 	if (!in_array($id_field, $boucle->group))
 	  $boucle->group[] = $id_field;
 	// postgres exige que le champ pour GROUP soit dans le SELECT
 	if (!in_array($id_field, $boucle->select))
 	  $boucle->select[] = $id_field;
+	*/
+
 	return $num;
 }
 
-- 
GitLab