From 4c34e354df295d00ac3f920aa90289305853f1ac Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Sun, 11 Nov 2007 16:59:40 -0600 Subject: [PATCH] Shifting other variables, no need to have the same code twice just more chance for a typo :) Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- admin/marctagstructure.pl | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index ef377e8e36..1cb3c7d9a6 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -154,14 +154,14 @@ if ($op eq 'add_form') { # called by add_form, used to insert/modify data in DB } elsif ($op eq 'add_validate') { my $tagfield =$input->param('tagfield'); + my $liblibrarian = $input->param('liblibrarian'); + my $libopac =$input->param('libopac'); + my $repeatable =$input->param('repeatable'); + my $mandatory =$input->param('mandatory'); + my $authorised_value =$input->param('authorised_value'); if ($input->param('modif')) { $sth=$dbh->prepare("UPDATE marc_tag_structure SET liblibrarian=? ,libopac=? ,repeatable=? ,mandatory=? ,authorised_value=? WHERE frameworkcode=? AND tagfield=?"); - my $liblibrarian = $input->param('liblibrarian'); - my $libopac =$input->param('libopac'); - my $repeatable =$input->param('repeatable'); - my $mandatory =$input->param('mandatory'); - my $authorised_value =$input->param('authorised_value'); - unless (C4::Context->config('demo') eq 1) { + unless (C4::Context->config('demo') eq 1) { $sth->execute( $liblibrarian, $libopac, $repeatable?1:0, @@ -174,11 +174,6 @@ if ($op eq 'add_form') { $sth->finish; } else { $sth=$dbh->prepare("INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) values (?,?,?,?,?,?,?)"); - my $liblibrarian = $input->param('liblibrarian'); - my $libopac =$input->param('libopac'); - my $repeatable =$input->param('repeatable'); - my $mandatory =$input->param('mandatory'); - my $authorised_value =$input->param('authorised_value'); unless (C4::Context->config('demo') eq 1) { $sth->execute($tagfield, $liblibrarian, -- 2.39.5