From 712d0532b7f38cfd33208aa981abc7da0035c08f Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Tue, 2 Nov 2004 07:28:33 +0000 Subject: [PATCH] closes FS#164 --- ChangeLog | 1 + htdocs/advanced_search.php | 4 ++-- htdocs/search.php | 4 ++-- include/search.classes.inc.php | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3acb5e3..f0093ea 100644 --- 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 diff --git a/htdocs/advanced_search.php b/htdocs/advanced_search.php index f60be82..d195c21 100644 --- a/htdocs/advanced_search.php +++ b/htdocs/advanced_search.php @@ -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'); diff --git a/htdocs/search.php b/htdocs/search.php index 1806e50..b689c36 100644 --- a/htdocs/search.php +++ b/htdocs/search.php @@ -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'); diff --git a/include/search.classes.inc.php b/include/search.classes.inc.php index dc43b27..8809255 100644 --- a/include/search.classes.inc.php +++ b/include/search.classes.inc.php @@ -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, -- 2.1.4