From eee07ae861c08381acbf281bcaf5bf32d0e02564 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 1 Oct 2009 11:28:24 +0100 Subject: [PATCH] Enable warnings in marctagstructure.pl Fix a couple of comparisons generating warnings Signed-off-by: Galen Charlton --- admin/marctagstructure.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index acd8cd7691..a9ae89269b 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -19,6 +19,7 @@ # Suite 330, Boston, MA 02111-1307 USA use strict; +use warnings; use CGI; use C4::Auth; use C4::Koha; @@ -148,7 +149,7 @@ if ($op eq 'add_form') { my $repeatable = $input->param('repeatable') ? 1 : 0; my $mandatory = $input->param('mandatory') ? 1 : 0; my $authorised_value = $input->param('authorised_value'); - unless (C4::Context->config('demo') eq 1) { + unless (C4::Context->config('demo') == 1) { if ($input->param('modif')) { $sth = $dbh->prepare( "UPDATE marc_tag_structure SET liblibrarian=? ,libopac=? ,repeatable=? ,mandatory=? ,authorised_value=? WHERE frameworkcode=? AND tagfield=?" @@ -193,7 +194,7 @@ if ($op eq 'add_form') { ################## DELETE_CONFIRMED ################################## # called by delete_confirm, used to effectively confirm deletion of data in DB } elsif ($op eq 'delete_confirmed') { - unless (C4::Context->config('demo') eq 1) { + unless (C4::Context->config('demo') == 1) { my $sth1 = $dbh->prepare("DELETE FROM marc_tag_structure WHERE tagfield=? AND frameworkcode=?"); my $sth2 = $dbh->prepare("DELETE FROM marc_subfield_structure WHERE tagfield=? AND frameworkcode=?"); $sth1->execute($searchfield, $frameworkcode); -- 2.39.5