Humpf...
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 19 Dec 2006 19:59:28 +0000 (19:59 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 19 Dec 2006 19:59:28 +0000 (19:59 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1296 839d8a87-29fc-0310-9880-83ba4fa771e5

include/validations.inc.php

index 95d57c0..6ea951a 100644 (file)
@@ -285,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)