various bugfixes
authorx2000habouzit <x2000habouzit>
Tue, 24 Aug 2004 20:13:21 +0000 (20:13 +0000)
committerx2000habouzit <x2000habouzit>
Tue, 24 Aug 2004 20:13:21 +0000 (20:13 +0000)
htdocs/antispam.php
templates/antispam.tpl

index 0b59ca0..633b4b7 100644 (file)
@@ -35,9 +35,13 @@ if (isset($_REQUEST['filtre']) and isset($_REQUEST['statut_filtre'])
     }
 }
 
-$result = $globals->db->query("select find_in_set('drop', flags) from emails where uid = {$_SESSION['uid']} and num = 0 and find_in_set('active', flags)");
-list($filtre) = mysql_num_rows($result) + intval(mysql_fetch_row($result));
+$result = $globals->db->query("SELECT FIND_IN_SET('drop', flags)
+                                FROM emails
+                                WHERE uid = {$_SESSION['uid']} AND num = 0 AND find_in_set('active', flags)");
+list($filtre) = mysql_fetch_row($result);
+$filtre += mysql_num_rows($result);
 mysql_free_result($result);
+
 $page->assign('filtre',$filtre);
 
 $page->run();
index bb83298..1b092f2 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: antispam.tpl,v 1.3 2004-02-04 19:47:47 x2000habouzit Exp $ *}
+{* $Id: antispam.tpl,v 1.4 2004-08-24 20:13:22 x2000habouzit Exp $ *}
 
 <div class="rubrique">
   Ton filtre anti-spam
@@ -29,11 +29,11 @@ Trois r
       <td>
         <strong>Choisis ton propre réglage :</strong><br />
         {dynamic}
-        <input type='radio' name='statut_filtre' value='0' {if $smarty.session.filtre eq 0}checked="checked"{/if} />
+        <input type='radio' name='statut_filtre' value='0' {if $filtre eq 0}checked="checked"{/if} />
         (1) le filtre anti-spam est coupé<br />
-        <input type='radio' name='statut_filtre' value='1' {if $smarty.session.filtre eq 1}checked="checked"{/if} />
+        <input type='radio' name='statut_filtre' value='1' {if $filtre eq 1}checked="checked"{/if} />
         (2) le filtre anti-spam est activé, et marque les mails<br />
-        <input type='radio' name='statut_filtre' value='2' {if $smarty.session.filtre eq 2}checked="checked"{/if} />
+        <input type='radio' name='statut_filtre' value='2' {if $filtre eq 2}checked="checked"{/if} />
         (3) le filtre anti-spam est activé, et élimine les mails détectés comme spams<br />
         {/dynamic}
       </td>