changeset 1:7dec52982000

Affichage uniquement des messages publiquement visible (non spam)
author Franck Deroche <webmaster@defr.org>
date Sat, 20 Oct 2007 14:25:20 +0200
parents 629389204276
children 1da880ffa7aa
files comment.php foot.php
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/comment.php	Sat Oct 20 14:15:10 2007 +0200
+++ b/comment.php	Sat Oct 20 14:25:20 2007 +0200
@@ -50,7 +50,7 @@
 	 {$Mess}<br />
 	 {$infos}
        </div>");
-      $Data->Query("SELECT * FROM Commentaires Where MessId={$id} ORDER BY num_comm");
+      $Data->Query("SELECT * FROM Commentaires Where MessId={$id} AND Visible=1 ORDER BY num_comm");
       $defaultGravatar = urlencode("http://defr.org/Misc/NoGravatar.png");
       while(0 !== ($row = $Data->GetRow())) {
          $dateFormatee = strftime(" à %Hh%M le <span class='Date'>%A %d %B %Y</span>", strtotime($row['DateComment']));
--- a/foot.php	Sat Oct 20 14:15:10 2007 +0200
+++ b/foot.php	Sat Oct 20 14:25:20 2007 +0200
@@ -154,7 +154,7 @@
       notamment à moi-même ) de repérer les nouveaux commentaires qui arrivent, même s'ils le sont sur des posts vieux de 6 mois ^^</p>
       <ul>
 <?php
-	$Data->Query("SELECT C.*, M.Titre FROM Commentaires C, Mess M WHERE C.MessId = M.num_mess ORDER BY num_comm DESC LIMIT 20");
+	$Data->Query("SELECT C.*, M.Titre FROM Commentaires C, Mess M WHERE C.MessId = M.num_mess AND C.Visible=1 ORDER BY num_comm DESC LIMIT 20");
 	$i = 0;
 	while(0 !== ($row = $Data->GetRow())) {
 		$i++;
@@ -186,4 +186,4 @@
 
    </dl>
   </body>
-</html>
\ No newline at end of file
+</html>