Removes remaining results count from queries (Closes #1572).
authorStéphane Jacob <sj@m4x.org>
Wed, 7 Dec 2011 11:59:44 +0000 (12:59 +0100)
committerStéphane Jacob <sj@m4x.org>
Wed, 7 Dec 2011 11:59:44 +0000 (12:59 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
ChangeLog
htdocs/javascript/search.js

index d7d6184..12158fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ VERSION 1.1.5                                                         XX XX XXXX
 Bug/Wish:
 
     * Search:
+        - #1572: Removes remaining results count from queries              -JAC
         - #1574: Correctly displays State corps                            -GLN
 
     * Validations:
index 1cfb380..989aee7 100644 (file)
@@ -145,6 +145,9 @@ function cleanForm(f, targeturl)
     }
     query = query.replace(/^(.*)&+$/, '$1');
     query = query.replace(/^&+(.*)$/, '$1');
+
+    // Removes "(n camarades)" if any of them are remaining.
+    query = query.replace(/\+\(\d+\+camarade(?:s)?\)/, '');
     if (query == 'rechercher=Chercher') {
         alert("Aucun critère n'a été spécifié.");
         return false;