closes FS#164
authorx2000habouzit <x2000habouzit>
Tue, 2 Nov 2004 07:28:33 +0000 (07:28 +0000)
committerx2000habouzit <x2000habouzit>
Tue, 2 Nov 2004 07:28:33 +0000 (07:28 +0000)
ChangeLog
htdocs/advanced_search.php
htdocs/search.php
include/search.classes.inc.php

index 3acb5e3..f0093ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@ Changes :
 
        * Search :
                - Hide SoundEX search when neither name nor second name selected.       -MC
+               - Married women are now well sorted.                                                            -MC
 
        * Search+Contacts :
                - Homeland is now a flag.  (FS#124)                                                                     -MC
index f60be82..d195c21 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: advanced_search.php,v 1.23 2004-10-31 17:47:55 x2000chevalier Exp $
+        $Id: advanced_search.php,v 1.24 2004-11-02 07:28:33 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -120,7 +120,7 @@ else {
             '.$globals->search_result_where_statement.'
                 '.(($where!='')?('WHERE '.$where):'').'
              ORDER BY  '.(logged() && !empty($_REQUEST['mod_date_sort']) ? 'date DESC,' :'')
-                       .implode(',',array_filter(array($fields->get_order_statement(),'promo DESC,nom,prenom'))).'
+                       .implode(',',array_filter(array($fields->get_order_statement(),'promo DESC,NomSortKey,prenom'))).'
                 LIMIT  '.$offset->value.','.$globals->search_results_per_page;
 
     $page->mysql_assign($sql, 'resultats', 'nb_resultats','nb_resultats_total');
index 1806e50..b689c36 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: search.php,v 1.38 2004-11-01 09:17:44 x2000chevalier Exp $
+        $Id: search.php,v 1.39 2004-11-02 07:28:34 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -77,7 +77,7 @@ if (array_key_exists('rechercher', $_REQUEST)) {
             '.$globals->search_result_where_statement.'
                 WHERE  '.$fields->get_where_statement().'
              ORDER BY  '.(logged() && !empty($_REQUEST['mod_date_sort']) ? 'date DESC,' :'')
-                       .implode(',',array_filter(array($fields->get_order_statement(),'promo DESC,nom,prenom'))).'
+                       .implode(',',array_filter(array($fields->get_order_statement(),'promo DESC,NomSortKey,prenom'))).'
                 LIMIT  '.$offset->value.','.$globals->search_results_per_page;
 
     $page->mysql_assign($sql, 'resultats', 'nb_resultats','nb_resultats_total');
index dc43b27..8809255 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: search.classes.inc.php,v 1.28 2004-10-31 17:45:15 x2000chevalier Exp $
+        $Id: search.classes.inc.php,v 1.29 2004-11-02 07:28:34 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once("xorg.misc.inc.php");
@@ -27,6 +27,7 @@ require_once("xorg.misc.inc.php");
  * Variables globales pour l'affichage des résultats de la recherche
  */
 $globals->search_result_fields = '
+               if(u.epouse=\'\', u.nom, u.epouse) AS NomSortKey,
                 u.epouse,u.date,u.web,u.mobile,
                 u.deces!=0 AS dcd,u.deces,
                FIND_IN_SET(\'femme\', u.flags) AS sexe,