The OPAC and staff search results page will now display
the library name instead of the library code in the limit
part of the search description, e.g.,
"kw,wrdl: cat branch:Centerville" instead of
"kw,wrdl: cat branch:CPL"
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
use XML::Simple;
use C4::Dates qw(format_date);
use C4::XSLT;
+use C4::Branch;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG);
$limit .= " and " if $limit || $query;
$limit .= "$this_limit";
$limit_cgi .= "&limit=$this_limit";
- $limit_desc .= " $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) {