From aefed23ec32ec77267256bbf244e18af93f9600d Mon Sep 17 00:00:00 2001 From: "Committo,Ergo:sum" <esj@rezo.net> Date: Thu, 12 Oct 2006 07:23:01 +0000 Subject: [PATCH] [6660] avec une syntaxe SQL correcte, c'est mieux. --- ecrire/inc/signatures.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecrire/inc/signatures.php b/ecrire/inc/signatures.php index bcafec1865..5dc19998fb 100644 --- a/ecrire/inc/signatures.php +++ b/ecrire/inc/signatures.php @@ -18,7 +18,7 @@ charger_generer_url(); // http://doc.spip.org/@controle_signatures function controle_signatures($script, $id, $debut, $where, $order, $limit='') { global $couleur_foncee; - + $where = tronconne_signatures($script, $id, $debut, $where, $limit); $limit = (!$limit AND !$debut) ? '' : (($debut ? "$debut," : "") . $limit); # ($limit . ($debut ? " OFFSET $debut" : "")); #PG @@ -107,7 +107,7 @@ function tronconne_signatures($script, $id_article, $debut, $where, $limit=10) } else $args = ""; - $res = spip_query("SELECT date_time FROM spip_signatures WHERE $where ORDER BY date_time DESC"); + $res = spip_query("SELECT date_time FROM spip_signatures " . ($where ? "WHERE $where" : '') . " ORDER BY date_time DESC"); while ($row = spip_fetch_array($res)) { if($c++%$limit==0) { -- GitLab