Backport
[platal.git] / modules / search.php
index fb14ea8..0db2640 100644 (file)
@@ -29,6 +29,12 @@ class SearchModule extends PLModule
         );
     }
 
+    function on_subscribe($forlife, $uid, $promo, $pass)
+    {
+        require_once 'user.func.inc.php';
+        user_reindex($uid);
+    }
+
     function get_quick($offset, $limit, $order)
     {
         global $globals;
@@ -139,6 +145,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'))).'