projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switches email related classes to the new User model.
[platal.git]
/
bin
/
cron
/
notifs.birthday.php
diff --git
a/bin/cron/notifs.birthday.php
b/bin/cron/notifs.birthday.php
index
7a6098a
..
542f67f
100755
(executable)
--- a/
bin/cron/notifs.birthday.php
+++ b/
bin/cron/notifs.birthday.php
@@
-1,7
+1,7
@@
-#!/usr/bin/php
4
-q
+#!/usr/bin/php
5
-q
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-200
6
Polytechnique.org *
+ * Copyright (C) 2003-200
8
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-26,10
+26,14
@@
$date = date('Y-m-d', time() + 7 * 24*60*60);
$stamp = date('Ymd000000');
$like = date('%-m-d', time() + 7 * 24*60*60);
$stamp = date('Ymd000000');
$like = date('%-m-d', time() + 7 * 24*60*60);
-$globals->db->query("INSERT INTO watch_ops (uid, cid, known, date)
- SELECT user_id, 4, $stamp, '$date'
- FROM auth_user_md5
- WHERE naissance LIKE '$like' AND deces=0");
+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
+ WHERE naissance LIKE '$like' AND deces=0");
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
?>
?>