From 428fcb3421d0176bdb92cc394fbaec00b84871a8 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 12 Apr 2019 13:07:18 -0400 Subject: [PATCH] Bug 15496: Tidy code block (Whitespace changes only) Signed-off-by: Liz Rea Signed-off-by: Josef Moravec Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens --- cataloguing/moveitem.pl | 50 +++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/cataloguing/moveitem.pl b/cataloguing/moveitem.pl index 5ef4ffe259..49641f45e2 100755 --- a/cataloguing/moveitem.pl +++ b/cataloguing/moveitem.pl @@ -65,38 +65,44 @@ $template->param(bibliotitle => $biblio->title); $template->param(biblionumber => $biblionumber); # If we already have the barcode of the item to move and the biblionumber to move the item to -if ($barcode && $biblionumber) { +if ( $barcode && $biblionumber ) { my $itemnumber; - my $item = Koha::Items->find({ barcode => $barcode }); + my $item = Koha::Items->find( { barcode => $barcode } ); if ($item) { $itemnumber = $item->itemnumber; my $frombiblionumber = $item->biblionumber; - my $moveresult = MoveItemFromBiblio($itemnumber, $frombiblionumber, $biblionumber); - if ($moveresult) { - $template->param(success => 1); - } else { - $template->param(error => 1, - errornonewitem => 1); - } + my $moveresult = MoveItemFromBiblio( $itemnumber, $frombiblionumber, $biblionumber ); + if ($moveresult) { + $template->param( success => 1 ); + } + else { + $template->param( + error => 1, + errornonewitem => 1 + ); + } - - } else { - $template->param(error => 1, - errornoitem => 1); - } + } + else { + $template->param( + error => 1, + errornoitem => 1 + ); + } $template->param( - barcode => $barcode, - itemnumber => $itemnumber, - ); - -} else { - $template->param(missingparameter => 1); - if (!$barcode) { $template->param(missingbarcode => 1); } - if (!$biblionumber) { $template->param(missingbiblionumber => 1); } + barcode => $barcode, + itemnumber => $itemnumber, + ); + +} +else { + $template->param( missingparameter => 1 ); + if ( !$barcode ) { $template->param( missingbarcode => 1 ); } + if ( !$biblionumber ) { $template->param( missingbiblionumber => 1 ); } } -- 2.39.5