Bug 12600: remove duplicate use statement from code
authorColin Campbell <colin.campbell@ptfs-europe.com>
Fri, 18 Jul 2014 08:50:34 +0000 (09:50 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 23 Sep 2014 20:51:48 +0000 (20:51 +0000)
A use C4::Charset was added deep in the body of the code
we have already imported it at the top of the file
(the by convention normal place) As use is executed at compile time
specifying it in the code body does not serve a
useful purpose and detracts from the readability of an already
overly complex subroutine.
Remove the superfluous statement
also removed the tabs introduced to the surrounding lines
by the same commit

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Search still works, no errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

C4/Search.pm

index 86b2d69..55072fd 100644 (file)
@@ -2035,13 +2035,12 @@ sub searchResults {
         }
 
         # XSLT processing of some stuff
-       use C4::Charset;
-       SetUTF8Flag($marcrecord);
+        SetUTF8Flag($marcrecord);
         warn $marcrecord->as_formatted if $DEBUG;
-       my $interface = $search_context eq 'opac' ? 'OPAC' : '';
-       if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) {
+        my $interface = $search_context eq 'opac' ? 'OPAC' : '';
+        if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) {
             $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems);
-           # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
+        # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
         }
 
         # if biblio level itypes are used and itemtype is notforloan, it can't be reserved either