Merge branch 'platal-0.10.0'
[platal.git] / bin / cron / notifs.birthday.php
index ca27d84..46c2ae0 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -26,6 +26,9 @@ $date  = date('Y-m-d', time() + 7 * 24*60*60);
 $stamp = date('Ymd000000');
 $like  = date('%-m-d', time() + 7 * 24*60*60);
 
+XDB::execute("DELETE FROM  watch_ops
+                    WHERE  cid = 4 AND date < CURDATE()");
+
 XDB::execute("INSERT INTO  watch_ops (uid, cid, known, date)
                    SELECT  user_id, 4, $stamp, '$date'
                      FROM  auth_user_md5