From f26b01cb794386b8335ba63b3c549713560ca58b Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Fri, 1 Nov 2024 17:04:12 +0000 Subject: [PATCH] Bug 32773: (follow-up) perltidy --- catalogue/detail.pl | 4 ++-- catalogue/moredetail.pl | 4 ++-- cataloguing/addbiblio.pl | 16 ++++++++-------- cataloguing/additem.pl | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 13b33818b5..7a31359d36 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -98,8 +98,8 @@ my $is_fast_add = : 0; $template->param( - biblio => $biblio, - activetab => $activetab, + biblio => $biblio, + activetab => $activetab, is_fast_add => $is_fast_add, ); diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index f8d67b71ed..9e36778b87 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -108,9 +108,9 @@ my $record = $biblio ? $biblio->metadata->record : undef; output_and_exit( $query, $cookie, $template, 'unknown_biblio') unless $biblio && $record; -my $fw = GetFrameworkCode($biblionumber); +my $fw = GetFrameworkCode($biblionumber); my $is_fast_add = Koha::BiblioFrameworks->find($fw)->is_fast_add; -my $all_items = $biblio->items->search_ordered; +my $all_items = $biblio->items->search_ordered; my @items; my $patron = Koha::Patrons->find( $loggedinuser ); diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 8e513c0cda..238c43c8c0 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -519,7 +519,7 @@ $op = $input->param('op') // q{}; $frameworkcode = &GetFrameworkCode($biblionumber) if ( $biblionumber and not( defined $frameworkcode) and $op ne 'cud-addbiblio' ); -my $is_fast_add = +my $is_fast_add = defined $frameworkcode && $frameworkcode ne '' ? Koha::BiblioFrameworks->find($frameworkcode)->is_fast_add : 0; @@ -572,7 +572,7 @@ if ($biblionumber) { } } -if ($frameworkcode eq 'FA' || $is_fast_add){ +if ( $frameworkcode eq 'FA' || $is_fast_add ){ # We need to grab and set some variables in the template for use on the additems screen $template->param( 'circborrowernumber' => $fa_circborrowernumber, @@ -726,7 +726,7 @@ if ( $op eq "cud-addbiblio" ) { ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode ); } if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){ - if ($frameworkcode eq 'FA' || $is_fast_add){ + if ( $frameworkcode eq 'FA' || $is_fast_add ){ print $input->redirect( '/cgi-bin/koha/cataloguing/additem.pl?' .'biblionumber='.$biblionumber @@ -864,12 +864,12 @@ if ( $record ne '-1' ) { $template->param( title => $title ); } $template->param( - popup => $mode, - frameworkcode => $frameworkcode, - is_fast_add => $is_fast_add, - itemtype => $frameworkcode, + popup => $mode, + frameworkcode => $frameworkcode, + is_fast_add => $is_fast_add, + itemtype => $frameworkcode, borrowernumber => $loggedinuser, - tab => scalar $input->param('tab') + tab => scalar $input->param('tab') ); $template->{'VARS'}->{'searchid'} = $searchid; diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index f4203f1996..a5586a5c6f 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -143,7 +143,7 @@ my $display_order = $input->param('item_group_display_order'); our $frameworkcode = &GetFrameworkCode($biblionumber); -my $is_fast_add = +my $is_fast_add = defined $frameworkcode && $frameworkcode ne '' ? Koha::BiblioFrameworks->find($frameworkcode)->is_fast_add : 0; @@ -193,7 +193,7 @@ $restrictededition = 0 if ( $restrictededition != 0 && C4::Context->IsSuperLibra # In case user has fast cataloging permission (and we're in fast cataloging), editing is not restricted $restrictededition = 0 if ( $restrictededition != 0 - && ($frameworkcode eq 'FA' || $is_fast_add) + && ( $frameworkcode eq 'FA' || $is_fast_add ) && haspermission( $uid, { 'editcatalogue' => 'fast_cataloging' } ) ); our $tagslib = &GetMarcStructure( 1, $frameworkcode ); @@ -493,7 +493,7 @@ if ( $op eq "cud-additem" ) { undef($current_item); } } - if ( ($frameworkcode eq 'FA' || $is_fast_add) && $fa_circborrowernumber ) { + if ( ( $frameworkcode eq 'FA' || $is_fast_add ) && $fa_circborrowernumber ) { print $input->redirect( '/cgi-bin/koha/circ/circulation.pl?' . 'borrowernumber=' . $fa_circborrowernumber -- 2.39.5