From b3ec63d58dc3bb0e0e380774bf62b410542deb6d Mon Sep 17 00:00:00 2001 From: Olivier Le Floch Date: Fri, 30 May 2008 17:52:39 +0200 Subject: [PATCH] Fix '...' entry in advanced search, clicking it now has no effect (better than inserting '...' into the input) --- modules/search.php | 2 +- templates/search/adv.form.tpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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>'; -- 2.1.4