Some extra auth_user fixes.
[platal.git] / modules / search.php
index 9761dd4..8a5710b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -172,7 +172,7 @@ class SearchModule extends PLModule
                 'networking_type' => array('field' => 'network_type', 'table' => 'profile_networking_enum',
                                            'text' => 'name', 'exact' => false),
                 'groupex'         => array('field' => 'id', 'table' => 'groupex.asso',
-                                           'text' => "(a.cat = 'GroupesX' OR a.cat = 'Institutions') AND pub = 'public' AND nom",
+                                           'text' => "(cat = 'GroupesX' OR cat = 'Institutions') AND pub = 'public' AND nom",
                                            'exact' => false),
                 'section'         => array('field' => 'id', 'table' => 'sections', 'text' => 'text', 'exact' => false),
                 'school'          => array('field' => 'id', 'table' => 'profile_education_enum', 'text' => 'name', 'exact' => false),
@@ -289,10 +289,6 @@ class SearchModule extends PLModule
             $field  = 'profile_job_enum.name';
             $unique = 'profile_job.uid';
             break;
-          case 'firstname':
-            $field = '`prenom`';
-            $beginwith = false;
-            break;
           case 'fonctionTxt':
             $db        = 'fonctions_def INNER JOIN
                           profile_job ON (profile_job.fonctionid = fonctions_def.id)';
@@ -313,11 +309,6 @@ class SearchModule extends PLModule
             $realid = 'a.id';
             $unique = 'm.uid';
             break;
-          case 'name':
-            $field = '`nom`';
-            $field2 = '`nom_usage`';
-            $beginwith = false;
-            break;
           case 'nationaliteTxt':
             $db = '`geoloc_pays` INNER JOIN
                    `auth_user_md5` ON (`geoloc_pays`.`a2` = `auth_user_md5`.`nationalite` OR
@@ -328,11 +319,6 @@ class SearchModule extends PLModule
                                        `geoloc_pays`.`nat`)';
             $realid = '`geoloc_pays`.`a2`';
             break;
-          case 'nickname':
-            $field = '`profile_nick`';
-            $db = '`auth_user_quick`';
-            $beginwith = false;
-            break;
           case 'description':
             $db     = 'profile_job';
             $field  = 'description';