<?php
/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
+ * Copyright (C) 2003-2007 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
return true;
}
}
+ if (!strlen(trim(Env::v('comm')))) {
+ return true;
+ }
$this->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");
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}>");
}
// }}}
+ // {{{ 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)