Add DirEnum for medals
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Wed, 7 Jul 2010 13:18:02 +0000 (15:18 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Wed, 7 Jul 2010 13:20:33 +0000 (15:20 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
classes/direnum.php

index e0b485d..4d24581 100644 (file)
@@ -238,6 +238,9 @@ abstract class DirEnumeration
     }
     // }}}
 
+    /** Builds a list of query parts for searching @$text in @$field :
+     * field LIKE 'text%', field LIKE '% text%', field LIKE '%-text%'
+     */
     private function mkTests($field, $text)
     {
         $tests = array();
@@ -627,5 +630,17 @@ class DE_Networking extends DirEnumeration
 }
 // }}}
 
+/** MEDALS
+ */
+// {{{ class DE_Medals
+class DE_Medals extends DirEnumeration
+{
+    protected $from = 'profile_medal_enum';
+
+    protected $ac_join = 'INNER JOIN profile_medals ON (profile_medals.mid = profile_medal_enum.id)';
+    protected $ac_unique = 'profile_medals.pid';
+}
+// }}}
+
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>