* Admin:
- #1399: Displays all similar entreprises only on demand -JAC
- #1362: List last profile modifications for secretary -JAC
+ - #1403: Displays grade if any in medal validation process -JAC
* Core:
- #1352: Fixes csv downloading with IE8. -JAC
public function medal_name()
{
- $res = XDB::query('SELECT m.text
- FROM profile_medal_enum AS m
- WHERE m.id = {?}', $this->mid);
- return $res->fetchOneCell();
+ $name = XDB::fetchOneCell('SELECT text
+ FROM profile_medal_enum
+ WHERE id = {?}', $this->mid);
+ $grade = XDB::fetchOneCell('SELECT text
+ FROM profile_medal_grade_enum
+ WHERE mid = {?} AND gid = {?}',
+ $this->mid, $this->gid);
+ if (is_null($grade)) {
+ return $name;
+ }
+ return $name . ' (' . $grade . ')';
}
// }}}