X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations.inc.php;h=b00fef36175a05380524b14dcd72592ef915a2ab;hb=315fa6ae2cbee21fec0ad56bda592a184860737a;hp=aeb8b4b36be5d29f56c738f24b3ff0ef798ed615;hpb=1e33266a2f91e1af7a5cb3e8fbbc1c49ff9341f3;p=platal.git diff --git a/include/validations.inc.php b/include/validations.inc.php index aeb8b4b..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 @@ -282,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)