X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations.inc.php;h=b00fef36175a05380524b14dcd72592ef915a2ab;hb=315fa6ae2cbee21fec0ad56bda592a184860737a;hp=bc88ddffc2635f9b4cab855004d75550a7557e1a;hpb=69b7b6e9d2c1ab2a698257bd7882333c5b9c0b81;p=platal.git diff --git a/include/validations.inc.php b/include/validations.inc.php index bc88ddf..b00fef3 100644 --- a/include/validations.inc.php +++ b/include/validations.inc.php @@ -1,6 +1,6 @@ comments[] = Array(S::v('bestalias'), Env::v('comm'), $formid); // envoi d'un mail à hotliners global $globals; - require_once('diogenes/diogenes.hermes.inc.php'); - $mailer = new HermesMailer; + $mailer = new PlMailer; $mailer->setSubject("Commentaires de validation {$this->type}"); $mailer->setFrom("validation+{$this->type}@{$globals->mail->domain}"); $mailer->addTo("hotliners@staff.polytechnique.org"); @@ -233,8 +235,7 @@ class Validate function sendmail($isok) { global $globals; - require_once('diogenes/diogenes.hermes.inc.php'); - $mailer = new HermesMailer; + $mailer = new PlMailer(); $mailer->setSubject($this->_mail_subj()); $mailer->setFrom("validation+{$this->type}@{$globals->mail->domain}"); $mailer->addTo("\"{$this->prenom} {$this->nom}\" <{$this->bestalias}@{$globals->mail->domain}>"); @@ -284,6 +285,21 @@ class Validate } // }}} + // {{{ function get_typed_requests() + + /** same as get_typed_request() but return an array of objects + */ + static function get_typed_requests($uid, $type) + { + $res = XDB::iterRow('SELECT data FROM requests WHERE user_id={?} and type={?}', $uid, $type); + $array = array(); + while (list($data) = $res->next()) { + $array[] = unserialize($data); + } + return $array; + } + + // }}} // {{{ function _mail_body function _mail_body($isok)