From da3b0a48e915799becb041791efb1259f1126444 Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Mon, 14 Jul 2008 15:40:37 -0500 Subject: [PATCH] fix "Add Tag" button in MARC framework editor This is part of bug 2282. This patch also improves the "Delete Tag" button so it brings you back to where you were. Signed-off-by: Joshua Ferraro --- admin/marctagstructure.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 5a24794d9c..2759a03af9 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -37,6 +37,7 @@ my $frameworkinfo = getframeworkinfo($frameworkcode); my $searchfield=$input->param('searchfield'); $searchfield=0 unless $searchfield; $searchfield=~ s/\,//g; +my $last_searchfield=$input->param('searchfield'); my $offset=$input->param('offset') || 0; my $op = $input->param('op') || ''; @@ -186,7 +187,7 @@ if ($op eq 'add_form') { } $sth->finish; } - print "Content-Type: text/html\n\n"; + print $input->redirect("/cgi-bin/koha/admin/marctagstructure.pl?searchfield=$tagfield&frameworkcode=$frameworkcode"); exit; # END $OP eq ADD_VALIDATE ################## DELETE_CONFIRM ################################## @@ -208,6 +209,9 @@ if ($op eq 'add_form') { $dbh->do("delete from marc_tag_structure where tagfield='$searchfield' and frameworkcode='$frameworkcode'"); $dbh->do("delete from marc_subfield_structure where tagfield='$searchfield' and frameworkcode='$frameworkcode'"); } + $template->param(searchfield => $searchfield, + frameworkcode => $frameworkcode, + ); # END $OP eq DELETE_CONFIRMED ################## ITEMTYPE_CREATE ################################## # called automatically if an unexisting frameworkis selected -- 2.39.5