Bug 15217 Remove redundant duplicate var declaration
authorColin Campbell <colin.campbell@ptfs-europe.com>
Thu, 19 Nov 2015 14:17:10 +0000 (14:17 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 30 Dec 2015 02:34:04 +0000 (02:34 +0000)
remove superfluous second declaration of template, borrowernumber and
cookie which are never used

Also removed the variables @results and @results_array which are
declared but not used

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  As suggested by Colin, perl -wc catalogue/search.pl doesn't complain
  anymore after applying the patch. perlcritic confirms the 2 variables
  were unused.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
catalogue/search.pl

index e74ceca..ef0bc8c 100755 (executable)
@@ -162,7 +162,6 @@ my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold");
 use CGI qw('-no_undef_params' -utf8 );
 my $cgi = new CGI;
 
-my ($template,$borrowernumber,$cookie);
 # decide which template to use
 my $template_name;
 my $template_type;
@@ -484,8 +483,6 @@ my $expanded_facet = $params->{'expand'};
 # Define some global variables
 my ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type);
 
-my @results;
-
 ## I. BUILD THE QUERY
 ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by,$scan,$lang);
 
@@ -526,7 +523,6 @@ $template->param ( LIMIT_INPUTS => \@limit_inputs );
 ## II. DO THE SEARCH AND GET THE RESULTS
 my $total; # the total results for the whole set
 my $facets; # this object stores the faceted results that display on the left-hand of the results page
-my @results_array;
 my $results_hashref;
 
 eval {