From d0184e481c61d55bb3bc62dcd010b7763ae2a668 Mon Sep 17 00:00:00 2001
From: Fil <fil@rezo.net>
Date: Thu, 22 Jun 2006 09:20:43 +0000
Subject: [PATCH] =?UTF-8?q?debut=5Fid=5Fforum=20=C3=A9tait=20cass=C3=A9e?=
 =?UTF-8?q?=20dans=20le=20controle=5Fforum?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/exec/controle_forum.php | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/ecrire/exec/controle_forum.php b/ecrire/exec/controle_forum.php
index d37e464981..ab546dc66d 100644
--- a/ecrire/exec/controle_forum.php
+++ b/ecrire/exec/controle_forum.php
@@ -232,12 +232,13 @@ function exec_controle_forum_dist()
   }
   list($from,$where) = critere_statut_controle_forum($page, $id_rubrique);
 
-// Si un id_controle_forum est demande, on adapte le debut
-  if ($debut_id_forum = intval($debut_id_forum)) {
-    $d = spip_fetch_array(spip_query("SELECT date_heure FROM spip_forum WHERE id_forum=$debut_id_forum"));
-    $debut = spip_query("SELECT COUNT(*) AS n FROM $from " . (!$where ? '' : "WHERE $where ") . (!$d ? '' : (" AND F.date_heure > '".$d['date_heure']."'")));
-    $debut = $debut['n'];
-}
+	// Si un id_controle_forum est demande, on adapte le debut
+	if ($debut_id_forum = intval($debut_id_forum)
+	AND $d = spip_fetch_array(spip_query("SELECT date_heure FROM spip_forum WHERE id_forum=$debut_id_forum"))) {
+		$debut = spip_fetch_array(spip_query($q = "SELECT COUNT(*) AS n FROM $from " . (!$where ? '' : "WHERE $where ") . (!$d ? '' : (" AND F.date_heure > '".$d['date_heure']."'"))));
+		$debut = $debut['n'];
+	}
+
  $debut= intval($debut);
 
  $pack = 20;	// nb de forums affiches par page
-- 
GitLab