Enable warnings in marctagstructure.pl
authorColin Campbell <colin.campbell@ptfs-europe.com>
Thu, 1 Oct 2009 10:28:24 +0000 (11:28 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Tue, 9 Feb 2010 02:25:45 +0000 (21:25 -0500)
Fix a couple of comparisons generating warnings

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
admin/marctagstructure.pl

index acd8cd7..a9ae892 100755 (executable)
@@ -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);