From 69e42b044d4b23d6b2cfa5b3f10440929d0c007c Mon Sep 17 00:00:00 2001
From: "Committo,Ergo:sum" <esj@rezo.net>
Date: Fri, 20 Oct 2006 14:08:04 +0000
Subject: [PATCH] =?UTF-8?q?[7656]=20faisait=20que=20afficher=5Farticles=20?=
 =?UTF-8?q?ne=20calculait=20plus=20un=20hash=20diff=C3=A9rentpour=20des=20?=
 =?UTF-8?q?requ=C3=AAtes=20diff=C3=A9rentes=20(md5=20sur=20un=20tableau=20?=
 =?UTF-8?q?=3D=20md5=20sur=20la=20chaine=20'Array')?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/inc/presentation.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ecrire/inc/presentation.php b/ecrire/inc/presentation.php
index f4fbc48b32..9f6d88cd63 100644
--- a/ecrire/inc/presentation.php
+++ b/ecrire/inc/presentation.php
@@ -695,7 +695,7 @@ function afficher_articles($titre_table, $requete, $afficher_visites = false, $a
 	// memo des arguments en base pour gérer l'affichage par tranche
 	// et/ou par langues.
 
-	$hash = "0x".substr(md5($connect_id_auteur.$requete.$titre_table), 0, 31);
+	$hash = "0x".substr(md5($connect_id_auteur. serialize($requete) . $titre_table), 0, 31);
 	$tmp_var = 't' . substr($hash, 2, 7);
 
 	$res_proch = spip_query("SELECT id_ajax_fonc FROM spip_ajax_fonc WHERE hash=$hash AND id_auteur=$connect_id_auteur LIMIT 1");
@@ -713,6 +713,7 @@ function afficher_articles($titre_table, $requete, $afficher_visites = false, $a
 
 		$id_ajax = spip_abstract_insert("spip_ajax_fonc", "(id_auteur, variables, hash, date)", "($connect_id_auteur, " . spip_abstract_quote($variables) . ", $hash, NOW())");
 		}
+
 	$activer_statistiques = $GLOBALS['meta']["activer_statistiques"];
 	$afficher_visites = ($afficher_visites AND $connect_statut == "0minirezo" AND $activer_statistiques != "non");
 	$afficher_langue = false;
@@ -864,7 +865,7 @@ $afficher_auteurs= true,  $obligatoire = false, $afficher_cadre = true, $affiche
 
 	$res = afficher_article_logo_trad($titre_table, $tranches, $largeurs, $table, $styles, $tmp_var, $id_ajax, 0);
 	
-	ajax_retour($res);
+	return $res;
 }
 
 // http://doc.spip.org/@afficher_articles_trad_boucle
-- 
GitLab