From 4b1a777c66c995ac72ff896c7b84bfdf8a6d3d0e Mon Sep 17 00:00:00 2001 From: ByWater Migration Support Date: Tue, 11 Jun 2013 07:50:11 -0700 Subject: [PATCH] Bug 10263 - Followup --- cataloguing/addbiblio.pl | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index a8ae3cf..ebd0e16 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -806,18 +806,21 @@ if ($breedingid) { ( $record, $encoding ) = MARCfindbreeding( $breedingid ) ; } -if ( $record != -1 && C4::Context->preference('IndependentBranchesMarcEditing') ) { - unless ( - GetIndependentGroupModificationRights( - { - for => $record->subfield( - GetMarcFromKohaField( 'biblio.branchcode', $frameworkcode ) - ) - } +if ( $record != -1 + && C4::Context->preference('IndependentBranchesMarcEditing') ) +{ + my ( $field, $subfield ) = + GetMarcFromKohaField( 'biblio.branchcode', $frameworkcode ); + if ( + defined( $record->field($field) ) + && defined( $record->subfield( $field, $subfield ) ) + && !GetIndependentGroupModificationRights( + { for => $record->subfield( $field, $subfield ) } ) ) { - print $input->redirect( "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" ); + print $input->redirect( + "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); exit; } } -- 1.7.2.5