--- C4/Search.pm | 42 +++++++++++++++++++++++------------------- 1 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/C4/Search.pm b/C4/Search.pm index c3cff65..9a66c9c 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1147,15 +1147,15 @@ sub buildQuery { # Date of Publication if ( $index eq 'yr' ) { $index .= ",st-numeric"; - $indexes_set++; - $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; +# $indexes_set++; + $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; } # Date of Acquisition elsif ( $index eq 'acqdate' ) { $index .= ",st-date-normalized"; - $indexes_set++; - $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; +# $indexes_set++; + $stemming = $auto_truncation = $weight_fields = $fuzzy_enabled = $remove_stopwords = 0; } # ISBN,ISSN,Standard Number, don't need special treatment elsif ( $index eq 'nb' || $index eq 'ns' ) { @@ -1336,21 +1336,25 @@ sub buildQuery { # Regular old limits else { - $limit .= " and " if $limit || $query; - $limit .= "$this_limit"; - $limit_cgi .= "&limit=$this_limit"; - if ($this_limit =~ /^branch:(.+)/) { - my $branchcode = $1; - my $branchname = GetBranchName($branchcode); - if (defined $branchname) { - $limit_desc .= " branch:$branchname"; - } else { - $limit_desc .= " $this_limit"; - } - } else { - $limit_desc .= " $this_limit"; - } - } + if ($this_limit){ + $limit .= " and " if $limit || $query; + $limit .= "$this_limit"; + $limit_cgi .= "&limit=$this_limit"; + if ($this_limit =~ /^branch:(.+)/) { + my $branchcode = $1; + my $branchname = GetBranchName($branchcode); + if (defined $branchname) { + $limit_desc .= " branch:$branchname"; + } + else { + $limit_desc .= " $this_limit"; + } + } + else { + $limit_desc .= " $this_limit"; + } + } + } } if ($group_OR_limits) { $limit .= " and " if ( $query || $limit ); -- 1.7.4.1 _______________________________________________ Koha-patches mailing list Koha-patches@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/