Wiki search do not require admin perms
[platal.git] / bin / emails.broken.php
index d1a31f7..626286e 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  Copyright (C) 2003-2007 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -96,6 +96,10 @@ XDB::execute("UPDATE emails
                  SET panne_level = panne_level - 1
                WHERE flags = 'active' AND panne_level > 1
                      AND last != CURDATE()");
+XDB::execute("UPDATE emails
+                 SET panne_level = 0
+               WHERE flags = 'active' AND panne_level = 1
+                     AND DATE_ADD(last, INTERVAL 1 YEAR) < CURDATE()");
 
 $csv = "nom;prenom;promo;alias;bounce;nbmails\n";
 foreach ($list as $alias=>$mails) {