fleches plus petites pour #484
[platal.git] / modules / search.php
index eb7c9f1..096b61e 100644 (file)
@@ -26,9 +26,16 @@ class SearchModule extends PLModule
         return array(
             'search'     => $this->make_hook('quick', AUTH_PUBLIC),
             'search/adv' => $this->make_hook('advanced', AUTH_COOKIE),
+            'advanced_search.php' => $this->make_hook('redir_advanced', AUTH_PUBLIC),
         );
     }
 
+    function handler_redir_advanced(&$page, $mode = null)
+    {
+        pl_redirect('search/adv');
+        exit;
+    }
+
     function on_subscribe($forlife, $uid, $promo, $pass)
     {
         require_once 'user.func.inc.php';
@@ -145,6 +152,7 @@ class SearchModule extends PLModule
                                                    AND w.uid='.S::v('uid').')
                 '.$globals->search->result_where_statement."
                     $where
+                 GROUP BY  u.user_id
                  ORDER BY  ".($order?($order.', '):'')
                 .implode(',',array_filter(array($fields->get_order_statement(),
                                                 'promo DESC, NomSortKey, prenom'))).'