From 59322098e326496953b057c3732c5c0b9718c79c Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Wed, 25 Feb 2004 12:33:45 +0000 Subject: [PATCH] =?UTF-8?q?c'est=20peut-=C3=AAtre=20pour=20=C3=A7a=20que?= =?UTF-8?q?=20la=20corbeille=20a=20du=20mal=20=C3=A0=20se=20vider=20=3F=3F?= =?UTF-8?q?=3F=20=20une=20fois=20qu'un=20article=20a=20une=20popularit?= =?UTF-8?q?=C3=A9=20non=20nulle,=20chaque=20m-=C3=A0-j=20de=20la=20popular?= =?UTF-8?q?ite=20entraine=20une=20modification=20du=20champ=20'maj',=20don?= =?UTF-8?q?c=20optimiser=20n'y=20touche=20pas.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/inc_statistiques.php3 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ecrire/inc_statistiques.php3 b/ecrire/inc_statistiques.php3 index 5b430bb704..f39bda8d28 100644 --- a/ecrire/inc_statistiques.php3 +++ b/ecrire/inc_statistiques.php3 @@ -290,7 +290,7 @@ function calculer_visites($date = "") { // Mise a jour de la base if (is_array($visites_update)) { while (list($visites, $articles) = each($visites_update)) { - $query = "UPDATE spip_articles SET visites = visites + $visites ". + $query = "UPDATE spip_articles SET maj=maj, visites = visites + $visites ". "WHERE id_article IN (".join(', ', $articles).")"; $result = spip_query($query); } @@ -330,7 +330,7 @@ function calculer_popularites() { $b = log(2) * $periode / $demivie; // oublier un peu le passe - spip_query("UPDATE spip_articles SET popularite = popularite * $a"); + spip_query("UPDATE spip_articles SET maj=maj, popularite = popularite * $a"); // ajouter les points visites $count_article = Array(); @@ -343,7 +343,7 @@ function calculer_popularites() { reset ($count_article); while (list($count,$articles) = each($count_article)) { $query = "UPDATE spip_articles - SET popularite = GREATEST(1,popularite) + $b * $count + SET maj=maj, popularite = GREATEST(1,popularite) + $b * $count WHERE id_article IN (0$articles)"; spip_query($query); } @@ -359,7 +359,7 @@ function calculer_popularites() { reset ($count_article); while (list($count,$articles) = each($count_article)) { $query = "UPDATE spip_articles - SET popularite = GREATEST(1,popularite) + $b * $count + SET maj=maj, popularite = GREATEST(1,popularite) + $b * $count WHERE id_article IN (0$articles)"; spip_query($query); } -- GitLab