From 558fc5dd83fe1bd7c79c18643f0ddbf479292704 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Mon, 29 Oct 2007 17:42:28 -0500 Subject: [PATCH] fixing branch limits and searchdomain limits Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Search.pm | 1 + catalogue/search.pl | 6 +++--- etc/zebradb/biblios/etc/bib1.att | 2 +- etc/zebradb/biblios/etc/record.abs | 2 +- .../intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 9de05d150c..4027d35d5e 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -826,6 +826,7 @@ sub buildQuery { $limit_search_desc = " and ($limit_search_desc)" if $limit_search_desc; } + warn "LIMIT: $limit_query"; $query .= $limit_query; $human_search_desc .= $limit_search_desc; diff --git a/catalogue/search.pl b/catalogue/search.pl index 996f4d296e..825101a5a2 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -179,7 +179,7 @@ my ($template,$borrowernumber,$cookie); my $template_name; my $template_type; my @params = $cgi->param("limit"); -if ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) ) { +if ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) { $template_name = 'catalogue/results.tmpl'; } else { @@ -236,7 +236,7 @@ my $branches = GetBranches(); my @branch_loop; #push @branch_loop, {value => "", branchname => "All Branches", }; for my $branch_hash (sort keys %$branches) { - push @branch_loop, {value => "branch:$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, }; + push @branch_loop, {value => "$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, }; } my $categories = GetBranchCategories(undef,'searchdomain'); @@ -372,7 +372,7 @@ my @limits; @limits = split("\0",$params->{'limit'}) if $params->{'limit'}; if($params->{'multibranchlimit'}) { -push @limits, join(" or ", map { "branch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ; +push @limits, join(" or ", map { "homebranch: $_ "} @{GetBranchesInCategory($params->{'multibranchlimit'})}) ; } my $available; diff --git a/etc/zebradb/biblios/etc/bib1.att b/etc/zebradb/biblios/etc/bib1.att index 201561e8ce..69c7dce6fd 100644 --- a/etc/zebradb/biblios/etc/bib1.att +++ b/etc/zebradb/biblios/etc/bib1.att @@ -127,7 +127,7 @@ att 8007 cn-sort att 8008 notforloan att 8009 ccode att 8010 itemnumber -att 8011 Code-institution +att 8011 homebranch att 8012 holdingbranch att 8013 location att 8014 Date-of-acquisition diff --git a/etc/zebradb/biblios/etc/record.abs b/etc/zebradb/biblios/etc/record.abs index 9356204d42..17b3d4c8d1 100644 --- a/etc/zebradb/biblios/etc/record.abs +++ b/etc/zebradb/biblios/etc/record.abs @@ -238,7 +238,7 @@ melm 952$6 cn-sort:n,!:s melm 952$7 notforloan:n,!:w melm 952$8 ccode melm 952$9 itemnumber:n,!:s -melm 952$a Code-institution +melm 952$a homebranch melm 952$b holdingbranch melm 952$c location diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl index 7d9ed565d3..3824ed805f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl @@ -267,7 +267,7 @@ -- 2.39.5