[Koha-patches] [PATCH] Bug 2505: Adds warnings to opac-ics.pl and opac-search-history.pl

Garry Collum gcollum at gmail.com
Wed Feb 3 01:05:16 CET 2010


No warnings generated from opac-ics.pl
Fixes warnings for opac-search-history.pl
---
 opac/opac-ics.pl            |    2 ++
 opac/opac-search-history.pl |    4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/opac/opac-ics.pl b/opac/opac-ics.pl
index 9206e8b..2b06517 100755
--- a/opac/opac-ics.pl
+++ b/opac/opac-ics.pl
@@ -20,6 +20,8 @@
 # This script builds an ICalendar file (rfc 2445) for use in programs such as Ical
 
 use strict;
+use warnings;
+
 use CGI;
 use Data::ICal;
 use Data::ICal::Entry::Event;
diff --git a/opac/opac-search-history.pl b/opac/opac-search-history.pl
index 97db2d5..8c461d2 100755
--- a/opac/opac-search-history.pl
+++ b/opac/opac-search-history.pl
@@ -18,6 +18,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use C4::Auth qw(:DEFAULT get_session);
 use CGI;
 use Storable qw(freeze thaw);
@@ -46,7 +48,7 @@ my ($template, $loggedinuser, $cookie)
 $template->param(dateformat => C4::Context->preference("dateformat"));
 
 # If the user is not logged in, we deal with the cookie
-if ($loggedinuser == '') {
+if (!$loggedinuser) {
 
     # Deleting search history
     if ($cgi->param('action') && $cgi->param('action') eq 'delete') {
-- 
1.5.6.5




More information about the Koha-patches mailing list