From a0bb0e5ac0d77c588ed1e6ff86f8813a05e1d62a Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Mon, 23 Apr 2001 14:55:42 +0000 Subject: [PATCH] Fixes for searches --- plugins/Search/Search.pm | 2 +- plugins/Search/search.pl | 2 ++ plugins/Search/templates/commentsearch;search;default | 2 +- plugins/Search/templates/pagination;search;default | 5 ----- plugins/Search/templates/storysearch;search;default | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/Search/Search.pm b/plugins/Search/Search.pm index f03ce77b0..931dc08d4 100644 --- a/plugins/Search/Search.pm +++ b/plugins/Search/Search.pm @@ -112,7 +112,7 @@ sub findUsers { } if ($form->{query}) { - $sql .= ' AND ' if @$users_to_ignore; + $sql .= ' AND '; my $kw = $self->_keysearch($form->{query}, ['nickname', 'ifnull(fakeemail,"")']); $kw =~ s/as kw$//; $kw =~ s/\+/ OR /g; diff --git a/plugins/Search/search.pl b/plugins/Search/search.pl index fb1fc3863..1f029639a 100755 --- a/plugins/Search/search.pl +++ b/plugins/Search/search.pl @@ -118,6 +118,7 @@ sub commentSearch { back => $back, forward => $forward, args => _buildargs($form), + start => $start, }); } @@ -192,6 +193,7 @@ sub storySearch { back => $back, forward => $forward, args => _buildargs($form), + start => $start, }); } diff --git a/plugins/Search/templates/commentsearch;search;default b/plugins/Search/templates/commentsearch;search;default index 99d90af52..7eda0d088 100644 --- a/plugins/Search/templates/commentsearch;search;default +++ b/plugins/Search/templates/commentsearch;search;default @@ -16,7 +16,7 @@ __template__ each of the last 30,000 or so comments posted. Older comments are removed and currently only visible as static HTML.

[% IF comments %] - [% x = 0 %] + [% x = start ? start : 1 %] [% FOREACH comment=comments %] [% user_email = Slash.db.getUser(comment.9, ['fakeemail', 'nickname']) %]
[% x %] diff --git a/plugins/Search/templates/pagination;search;default b/plugins/Search/templates/pagination;search;default index 51a2cff61..2d97cf072 100755 --- a/plugins/Search/templates/pagination;search;default +++ b/plugins/Search/templates/pagination;search;default @@ -13,9 +13,6 @@ pagination __template__ [% back = back || 0; IF (back > -1) || forward %] - - - [% IF forward %] <Next [% constants.search_default_display %] matches [% END %] @@ -25,8 +22,6 @@ __template__ [% IF (back > -1) %] Last [% constants.search_default_display %] matches> [% END %] - - [% END %] __seclev__ 100 diff --git a/plugins/Search/templates/storysearch;search;default b/plugins/Search/templates/storysearch;search;default index 2c8cef460..f2721a7a0 100644 --- a/plugins/Search/templates/storysearch;search;default +++ b/plugins/Search/templates/storysearch;search;default @@ -13,7 +13,7 @@ storysearch __template__ [% USE Slash %] [% IF stories %] - [% x = 0 %] + [% x = start ? start : 1 %] [% FOREACH story=stories %] [% x + form.min %] [% Slash.linkStory({