From 7f7ef715c9fa05447f9615739134b6cbadb3ca45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Tue, 20 Jul 2010 00:57:33 +0200 Subject: [PATCH] Add DirEnum for corps/corpsranks MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/direnum.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) 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 -- 2.1.4