- return XDB::execute('REPLACE INTO profile_medals_sub VALUES({?}, {?}, {?})', $this->uid, $this->mid, $this->gid);
+ require_once 'notifs.inc.php';
+ register_watch_op($this->user->id(), WATCH_FICHE, '', 'medals');
+ return XDB::execute('REPLACE INTO profile_medals_sub
+ VALUES ({?}, {?}, {?})',
+ $this->user->id(), $this->mid, $this->gid);
+ }
+
+ // }}}
+ // {{{ function get_request($medal)
+
+ static public function get_request($uid, $type)
+ {
+ $reqs = Validate::get_typed_requests($uid, 'medal');
+ foreach ($reqs as &$req) {
+ if ($req->mid == $type) {
+ return $req;
+ }
+ }
+ return null;