From c33e6cc2ca5270a5d020efe31c12953292ed24f2 Mon Sep 17 00:00:00 2001
From: "Committo,Ergo:sum" <esj@rezo.net>
Date: Sat, 18 Mar 2006 18:33:44 +0000
Subject: [PATCH] cas des jointures hors criteres [5987]: Oups2

---
 ecrire/public/boucles.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ecrire/public/boucles.php b/ecrire/public/boucles.php
index 27ee7f9c37..c50bcf37ce 100644
--- a/ecrire/public/boucles.php
+++ b/ecrire/public/boucles.php
@@ -255,11 +255,12 @@ function boucle_SYNDIC_ARTICLES_dist($id_boucle, &$boucles) {
 		if (!$jointure) {
 			$jointure = 'J' . count($boucle->from);
 			$boucle->from[$jointure] = 'spip_syndic';
+			$boucle->where[]= $id_table .'.id_syndic=' . $jointure . '.id_syndic';
 		}
 		$boucle->where[] = $id_table . ".statut='publie'";
 		$boucle->where[] = $jointure . ".statut='publie'";
-	}
 
+	}
 	return calculer_boucle($id_boucle, $boucles);
 }
 
-- 
GitLab