X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Fcron_validations.php;h=6c67503296e0a72f4f1092b213c1ebe04ea21e11;hb=c3b581dc531c40960509e3115d8c61ebd5897ee3;hp=d08d381bfa02f6b3a9c8b86ee5b4e018997ae00a;hpb=25fe4c85de79aa601948d788b5754b5b6070080d;p=platal.git diff --git a/bin/cron/cron_validations.php b/bin/cron/cron_validations.php index d08d381..6c67503 100755 --- a/bin/cron/cron_validations.php +++ b/bin/cron/cron_validations.php @@ -1,7 +1,7 @@ #!/usr/bin/php5 -q fetchOneRow(); $age = (time() - intval($age)) / 86400; $head = ""; if ($age > 15) { - $head = "[autodestruction du serveur] "; + $head = "[Autodestruction du serveur] "; } elseif ($age > 7) { - $head = "[armageddon imminent] "; + $head = "[Armageddon imminent] "; } elseif ($age > 5) { - $head = "[guerre nucléaire] "; + $head = "[Guerre nucléaire] "; } elseif ($age > 3) { $head = "[ET Téléphone maison] "; } elseif ($age > 1) { - $head = "[réveil !] "; + $head = "[Réveil !] "; } elseif (!empty($nbveryold)) { - $head = "[urgent] "; + $head = "[Urgent] "; } @@ -60,21 +60,21 @@ $plural = $nb == 1 ? "" : "s"; $mymail = new PlMailer(); $mymail->setFrom('validation@' . $globals->mail->domain); $mymail->addTo("validation@" . $globals->mail->domain); -$mymail->setSubject($head . "il y a $nb validation$plural non effectuée$plural"); +$mymail->setSubject($head . "Il y a $nb validation$plural non effectuée$plural"); $message = - "il y a $nb validation$plural à effectuer \n" + "Il y a $nb validation$plural à effectuer\n" .(empty($nbold)?"":"dont $nbold depuis le dernier mail !!!\n") .(empty($nbveryold)?"":"et dont *$nbveryold* ".($nbveryold == 1 ? "est" : "sont")." en retard de plus de 6h !!!") ."\n" ."https://www.polytechnique.org/admin/validate\n\n" ."Par catégorie :\n"; $res = XDB::iterRow("SELECT type, count(*) - FROM x4dat.requests + FROM requests GROUP BY type ORDER BY type"); while (list($type, $nb) = $res->next()) { - $message .= "- $type: $nb\n"; + $message .= "- $type : $nb\n"; } $message = wordwrap($message,78);