From 69af578577dceca06851774b0d5f85c3d2da41b6 Mon Sep 17 00:00:00 2001
From: Antoine Pitrou <pitrou@free.fr>
Date: Mon, 15 Apr 2002 12:43:46 +0000
Subject: [PATCH] =?UTF-8?q?Correction=20bug=20signal=C3=A9=20par=20Fil=20(?=
 =?UTF-8?q?en=20aveugle,=20je=20n'ai=20pas=20de=20quoi=20tester=20;-)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 inc-calcul-squel.php3 | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/inc-calcul-squel.php3 b/inc-calcul-squel.php3
index 34926443d2..ab20999674 100644
--- a/inc-calcul-squel.php3
+++ b/inc-calcul-squel.php3
@@ -329,7 +329,6 @@ function parser_boucle($texte, $id_parent) {
 						// Traitement general des relations externes
 						if ($s = $tables_relations[$type][$col]) {
 							$col_table = "rel_$type";
-							//$col_table = $s;
 							$req_from[] = "$s AS $col_table";
 							$req_where[] = "$table.$id_objet=$col_table.$id_objet";
 							$req_group = " GROUP BY $table.$id_objet";
@@ -349,13 +348,6 @@ function parser_boucle($texte, $id_parent) {
 							$req_group = " GROUP BY $table.$id_objet";
 							$flag_lien = true;
 						}
-/*						else if	($type == 'mots' AND ($col == 'id_syndic' OR $col == 'id_forum')) {
-							$col_table = 'spip_'.$type.'_'.substr($col, 3);
-							$req_from[] = $col_table;
-							$req_where[] = "$table.$id_objet=$col_table.$id_objet";
-							$req_group = " GROUP BY $table.$id_objet";
-							$flag_lien = true;
-						}*/
 
 						// Cas particulier : selection des documents selon l'extension
 						else if ($type == 'documents' AND $col == 'extension') {
@@ -428,10 +420,10 @@ function parser_boucle($texte, $id_parent) {
 							$req_order = " ORDER BY alea";
 						}
 						else if ($match[1] == 'titre_mot'){
-							$req_order= " ORDER BY spip_mots.titre";
+							$req_order= " ORDER BY rel_mots.titre";
 						}
 						else if ($match[1] == 'type_mot'){
-							$req_order= " ORDER BY spip_mots.type";
+							$req_order= " ORDER BY rel_mots.type";
 						}
 						else if ($match[1] == 'points'){
 							$req_order= " ORDER BY points";
@@ -485,7 +477,6 @@ function parser_boucle($texte, $id_parent) {
 				break;
 
 			case 'forums':
-				/* $forums_publics = lire_meta("forums_publics"); */
 				// Par defaut, selectionner uniquement les forums sans pere
 				if (!$plat) $req_where[] = "$table.id_parent=0";
 				$req_where[] = "$table.statut='publie'";
-- 
GitLab