Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Categories search results bug?

Quote Reply
Categories search results bug?
I am playing with my cat_alpha_bar idea and making tests to check if the related categories is shown in the search, I have checked that there is a problem:

When I make a search with more found categories than links, for example:

87 categories and 29 links

(my configuration points to 20 results in 'search options'), the results are shown in two pages:

Pages: 1 2 [>>]

In each page they appear 20 categories and 20+9 links, but the rest of categories they don't appear... Only appear when manually I put the numbers in the browser bar address

http://localhost/cgi-bin/search.cgi?catid=;isValidated=Yes;query=documentacion;d=1&nh= 3 or 4...

Is this a bug?

-----------------------
Nomada
Quote Reply
Re: [Nomada] Categories search results bug? In reply to
Hi,

Yes, this can be fixed by edit admin/Links/User/Search.pm and changing:

Code:
if ($link_count > $args->{mh}) {
my $url = $IN->url ( { query_string => 1 } );
$url =~ s/([;&?]?)nh=(\d+)/($1 and $1 eq '?') ? '?' : ''/eg;
$toolbar = Links::Build::build ('search_toolbar', { url => $url, numlinks => $link_count, nh => $args->{nh}, mh => $args->{mh} } );
}


to:

Code:
if (($link_count > $args->{mh}) or ($cat_count > $args->{mh})) {
my $url = $IN->url ( { query_string => 1 } );
$url =~ s/([;&?]?)nh=(\d+)/($1 and $1 eq '?') ? '?' : ''/eg;
$toolbar = Links::Build::build ('search_toolbar', {
url => $url,
numlinks => $link_count > $cat_count ? $link_count : $cat_count,
nh => $args->{nh},
mh => $args->{mh}
});
}


Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Categories search results bug? In reply to
Thanks Alex!!

Now works fine!! Wink

-----------------------
Nomada