View | Details | Raw Unified | Return to bug 9579
Collapse All | Expand All

(-)a/C4/Search.pm (-8 / +8 lines)
Lines 36-41 use URI::Escape; Link Here
36
use Business::ISBN;
36
use Business::ISBN;
37
use MARC::Record;
37
use MARC::Record;
38
use MARC::Field;
38
use MARC::Field;
39
use String::Multibyte;
39
use utf8;
40
use utf8;
40
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG);
41
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG);
41
42
Lines 580-592 sub getRecords { Link Here
580
                                # fix the length that will display in the label,
581
                                # fix the length that will display in the label,
581
                                my $facet_label_value = $one_facet;
582
                                my $facet_label_value = $one_facet;
582
                                my $facet_max_length  = C4::Context->preference(
583
                                my $facet_max_length  = C4::Context->preference(
583
                                    'FacetLabelTruncationLength')
584
                                    'FacetLabelTruncationLength') || 20;
584
                                  || 20;
585
                                my $mbsp = String::Multibyte->new('UTF8');
585
                                $facet_label_value =
586
                                if ($mbsp->length($facet_label_value) > $facet_max_length ) {
586
                                  substr( $one_facet, 0, $facet_max_length )
587
                                    $facet_label_value =
587
                                  . "..."
588
                                        $mbsp->substr( $one_facet, 0, $facet_max_length )
588
                                  if length($facet_label_value) >
589
                                        . "...";
589
                                      $facet_max_length;
590
                                }
590
591
591
                            # if it's a branch, label by the name, not the code,
592
                            # if it's a branch, label by the name, not the code,
592
                                if ( $link_value =~ /branch/ ) {
593
                                if ( $link_value =~ /branch/ ) {
593
- 

Return to bug 9579