From: Raphaël Barrois Date: Mon, 19 Jul 2010 22:57:33 +0000 (+0200) Subject: Add DirEnum for corps/corpsranks X-Git-Tag: xorg/1.0.1~316 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=7f7ef715c9fa05447f9615739134b6cbadb3ca45;p=platal.git Add DirEnum for corps/corpsranks Signed-off-by: Raphaël Barrois --- diff --git a/classes/direnum.php b/classes/direnum.php index 7dbf40c..c6fbf0d 100644 --- a/classes/direnum.php +++ b/classes/direnum.php @@ -40,6 +40,9 @@ class DirEnum const EDUDEGREES = 'educationdegrees'; const EDUFIELDS = 'educationfields'; + const CORPS = 'corps'; + const CORPSRANKS = 'corpsranks'; + const NATIONALITIES = 'nationalities'; const COUNTRIES = 'countries'; const ADMINAREAS = 'adminareas'; @@ -525,6 +528,32 @@ class DE_EducationFields extends DirEnumeration } // }}} +// {{{ class DE_Corps +class DE_Corps extends DirEnumeration +{ + protected $idfield = 'corps_enum.id'; + protected $valfield = 'corps_enum.name'; + protected $valfield2 = 'corps_enum.abbrev'; + protected $from = 'corps_enum'; + + protected $ac_unique = 'corps.pid'; + protected $ac_join = 'INNER JOIN corps ON (corps.current_corpsid = corps_enum.id)'; +} +// }}} + +// {{{ class DE_CorpsRanks +class DE_CorpsRanks extends DirEnumeration +{ + protected $idfield = 'corps_rank_enum.id'; + protected $valfield = 'corps_rank_enum.name'; + protected $valfield2 = 'corps_rank_enum.abbrev'; + protected $from = 'corps_rank_enum'; + + protected $ac_unique = 'corps.pid'; + protected $ac_join = 'INNER JOIN corps ON (corps.rankid = corps_rank_enum.id)'; +} +// }}} + /** GEOLOC */ // {{{ class DE_Nationalities