From 15b7782234b926eb570ec79b58975d441083d55d Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Sat, 30 Jun 2012 13:45:25 +0800 Subject: [PATCH] Bug 4064 - Uninitialized variable errors in opac-search.pl Merely optimized two if statements, already fixed in master. Signed-off-by: Julian Maurice Signed-off-by: Paul Poulain --- opac/opac-search.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 82b35d2335..46cf105cce 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -619,7 +619,7 @@ for (my $i=0;$i<@servers;$i++) { if (!$borrowernumber || $borrowernumber eq '') { # To a cookie (the user is not logged in) - if (($params->{'offset'}||'') eq '') { + if (!$offset) { push @recentSearches, { "query_desc" => $query_desc_history || "unknown", "query_cgi" => $query_cgi_history || "unknown", @@ -641,7 +641,7 @@ for (my $i=0;$i<@servers;$i++) { } else { # To the session (the user is logged in) - if (($params->{'offset'}||'') eq '') { + if (!$offset) { AddSearchHistory($borrowernumber, $cgi->cookie("CGISESSID"), $query_desc_history, $query_cgi_history, $total); $template->param(ShowOpacRecentSearchLink => 1); } -- 2.39.5