Backport
[platal.git] / bin / cron / cron_validations.php
index 4f1e440..415260b 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php4 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2004 Polytechnique.org                              *
+ *  Copyright (C) 2003-2006 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -29,7 +29,7 @@ $R_PERIOD = "INTERVAL 6 HOUR"; // p
 require('./connect.db.inc.php');
 require('diogenes/diogenes.hermes.inc.php');
 
-$res = $globals->xdb->query("SELECT count(stamp), sum(stamp < NOW() - $M_PERIOD), sum(stamp < NOW() - $R_PERIOD) FROM x4dat.requests");
+$res = XDB::query("SELECT count(stamp), sum(stamp < NOW() - $M_PERIOD), sum(stamp < NOW() - $R_PERIOD) FROM x4dat.requests");
 list($nb,$nbold,$nbveryold) = $res->fetchOneRow();
 
 if (empty($nb)) {
@@ -46,7 +46,7 @@ $message =
        .(empty($nbold)?"":"dont $nbold depuis le dernier mail !!!\n")
        .(empty($nbveryold)?"":"et dont *$nbveryold* sont en retard de plus de 6h !!!")
        ."\n"
-       ."https://www.polytechnique.org/admin/valider.php\n";
+       ."https://www.polytechnique.org/admin/validate\n";
 
 $message = wordwrap($message,78);  
 $mymail->setTxtBody($message);