From 3e764d1346b829a9f9e39fe6469fd6ecaca4ec74 Mon Sep 17 00:00:00 2001
From: ARNO* <arno@rezo.net>
Date: Thu, 25 Aug 2005 14:31:41 +0000
Subject: [PATCH] Emmelage de pinceaux au precedent post.
 afficher_tranches_requete fonctionne a nouveau (sauf erreur...)

---
 ecrire/inc_presentation.php3 | 5 +++--
 ecrire/mots_tous.php3        | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3
index 3558c3be10..1eccab4887 100644
--- a/ecrire/inc_presentation.php3
+++ b/ecrire/inc_presentation.php3
@@ -489,9 +489,10 @@ function afficher_tranches_requete(&$query, $colspan) {
 
 	$query = trim($query);
 	$query_count = eregi_replace('^(SELECT)[[:space:]].*[[:space:]](FROM)[[:space:]]', '\\1 COUNT(*) \\2 ', $query);
-	$query_count = eregi_replace('ORDER[[:space:]]+BY.*$', '', $query);
-	
+	$query_count = eregi_replace('ORDER[[:space:]]+BY.*$', '', $query_count);
+
 	list($num_rows) = spip_fetch_array(spip_query($query_count));
+	
 	if (!$num_rows) return;
 
 	$nb_aff = 10;
diff --git a/ecrire/mots_tous.php3 b/ecrire/mots_tous.php3
index de7ed7be39..0bda40be25 100644
--- a/ecrire/mots_tous.php3
+++ b/ecrire/mots_tous.php3
@@ -249,6 +249,8 @@ while ($row_groupes = spip_fetch_array($result_groupes)) {
 		echo "<div class='liste'>";
 		echo "<table border=0 cellspacing=0 cellpadding=3 width=\"100%\">";
 
+		echo $tranches;
+
 		$result = spip_query($query);
 		while ($row = spip_fetch_array($result)) {
 		
@@ -256,7 +258,6 @@ while ($row_groupes = spip_fetch_array($result_groupes)) {
 			
 			$id_mot = $row['id_mot'];
 			$titre_mot = $row['titre'];
-			$multi = $row['multi'];
 			
 			if ($connect_statut == "0minirezo")
 				$aff_articles="prepa,prop,publie,refuse";
-- 
GitLab