- //var_dump($this);
- $r = XDB::query("
- SELECT IF (g.text IS NOT NULL, CONCAT(m.text,' - ', g.text), m.text)
- FROM profile_medals AS m
- LEFT JOIN profile_medals_grades AS g ON(g.mid = m.id AND g.gid = {?})
- WHERE m.id = {?}", $this->gid, $this->mid);
- return $r->fetchOneCell();
+ //var_dump($this);
+ $r = XDB::query("
+ SELECT IF (g.text IS NOT NULL, CONCAT(m.text,' - ', g.text), m.text)
+ FROM profile_medals AS m
+ LEFT JOIN profile_medals_grades AS g ON(g.mid = m.id AND g.gid = {?})
+ WHERE m.id = {?}", $this->gid, $this->mid);
+ return $r->fetchOneCell();
+ }
+
+ // }}}
+ // {{{ function submit()
+
+ public function submit()
+ {
+ $res = XDB::query("SELECT FIND_IN_SET('validation', flags)
+ FROM profile_medals
+ WHERE id = {?}", $this->mid);
+ if ($res->fetchOneCell()) {
+ parent::submit();
+ } else {
+ $this->commit();
+ }