From: Stéphane Jacob Date: Sat, 24 Jul 2010 21:24:41 +0000 (+0200) Subject: Adds sport medals (also adds an exemple) (Closes #1203). X-Git-Tag: xorg/1.0.1~304 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=cfcb8b62f30d7710d29d7ec438ad24dbaeda5d7d;p=platal.git Adds sport medals (also adds an exemple) (Closes #1203). Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile/decos.inc.php b/modules/profile/decos.inc.php index a6cfabc..fa40cf9 100644 --- a/modules/profile/decos.inc.php +++ b/modules/profile/decos.inc.php @@ -126,21 +126,24 @@ class ProfileSettingDecos extends ProfilePage public function _prepare(PlPage &$page, $id) { - $res = XDB::iterator("SELECT *, FIND_IN_SET('validation', flags) AS validate - FROM profile_medal_enum - ORDER BY type, text"); - $mlist = array(); + $res = XDB::iterator('SELECT *, FIND_IN_SET(\'validation\', flags) AS validate + FROM profile_medal_enum + ORDER BY type, text'); + $mlist = array(); while ($tmp = $res->next()) { $mlist[$tmp['type']][] = $tmp; } $page->assign('medal_list', $mlist); - $trad = Array('ordre' => 'Ordres', - 'croix' => 'Croix', - 'militaire' => 'Médailles militaires', - 'honneur' => 'Médailles d\'honneur', - 'resistance' => 'Médailles de la résistance', - 'prix' => 'Prix'); - $page->assign('trad', $trad); + $fullType = array( + 'ordre' => 'Ordres', + 'croix' => 'Croix', + 'militaire' => 'Médailles militaires', + 'honneur' => 'Médailles d\'honneur', + 'resistance' => 'Médailles de la résistance', + 'prix' => 'Prix', + 'sport' => 'Médailles sportives' + ); + $page->assign('fullType', $fullType); } } diff --git a/templates/profile/deco.tpl b/templates/profile/deco.tpl index b6ef1a0..f284018 100644 --- a/templates/profile/deco.tpl +++ b/templates/profile/deco.tpl @@ -36,7 +36,7 @@