[Koha-patches] [PATCH 2/2] Enable warnings in marctagstructure.pl
Colin Campbell
colin.campbell at ptfs-europe.com
Thu Oct 1 12:28:24 CEST 2009
Fix a couple of comparisons generating warnings
---
admin/marctagstructure.pl | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl
index acd8cd7..a9ae892 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);
--
1.6.2.5
More information about the Koha-patches
mailing list