Update SearchSet args() function, and core for same functions.
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 16 Aug 2010 22:12:09 +0000 (00:12 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 22 Aug 2010 22:18:03 +0000 (00:18 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
core
include/userset.inc.php
templates/search/adv.links.tpl

diff --git a/core b/core
index 786bffb..e8e034f 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 786bffb570bfc2f5ff1dad386a9558501d4c16e8
+Subproject commit e8e034fd9237000dba475f8ed890bc52115963d5
index e4631a2..0612d2f 100644 (file)
@@ -126,6 +126,18 @@ class SearchSet extends ProfileSet
         parent::__construct($conds, $orders);
     }
 
+    /** Add a "rechercher=Chercher" field to the query to simulate the POST
+     * behaviour.
+     */
+    public function args()
+    {
+        $args = parent::args();
+        if (!isset($args['rechercher'])) {
+            $args['rechercher'] = 'Chercher';
+        }
+        return $args;
+    }
+
     protected function &getFilterResults(PlFilter &$pf, PlLimit $limit)
     {
         $profiles = $pf->getProfiles($limit, Profile::FETCH_MINIFICHES);
index 58afd76..381d450 100644 (file)
 <ul class="noprint">
   {if $with_soundex && ($smarty.request.firstname || $smarty.request.name)}
   <li>Étendre ta recherche par <strong>
-    <a  href="search/adv{$plset_search}with_soundex=1">proximité sonore</a>
+    <a  href="search/adv{$plset_args}with_soundex=1">proximité sonore</a>
   </strong>
   </li>
   {/if}
 
-  <li><strong><a href="search/adv{$plset_search|regex_replace:"/rechercher=[^&]*/":""}">Modifier</a>
+  <li><strong><a href="search/adv{$plset_args|regex_replace:"/rechercher=[^&]*/":""}">Modifier</a>
   </strong> ta recherche
   </li>