From: Olivier Le Floch Date: Fri, 30 May 2008 15:52:39 +0000 (+0200) Subject: Fix '...' entry in advanced search, clicking it now has no effect (better than insert... X-Git-Tag: core/1.0.0~163 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=b3ec63d58dc3bb0e0e380774bf62b410542deb6d;p=platal.git Fix '...' entry in advanced search, clicking it now has no effect (better than inserting '...' into the input) --- diff --git a/modules/search.php b/modules/search.php index a708d12..74d785f 100644 --- a/modules/search.php +++ b/modules/search.php @@ -390,7 +390,7 @@ class SearchModule extends PLModule while ($result = $list->next()) { $nbResults++; if ($nbResults == 11) { - $res .= '...|1'."\n"; + $res .= $q."|-1\n"; } else { $res .= $result['field'].'|'; $res .= $result['nb']; diff --git a/templates/search/adv.form.tpl b/templates/search/adv.form.tpl index ace8569..1a5e272 100644 --- a/templates/search/adv.form.tpl +++ b/templates/search/adv.form.tpl @@ -34,8 +34,8 @@ name = row[0].replace(regexp, '$1<\/strong>'); - if (row[1] == 1) { - return name; + if (row[1] === "-1") { + return '...'; } return name + '  -  ' + row[1] + ' camarades<\/em>';