Lines 444-449
my ($template, $loggedinuser, $cookie)
Link Here
|
444 |
|
444 |
|
445 |
# Does the user have a restricted item editing permission? |
445 |
# Does the user have a restricted item editing permission? |
446 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
446 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
|
|
447 |
|
448 |
my $item = $itemnumber ? Koha::Items->find( $itemnumber ) : undef; |
449 |
if ( $item && !$patron->can_edit_item( $item ) ) { |
450 |
print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); |
451 |
exit; |
452 |
} |
453 |
|
447 |
my $uid = $patron->userid; |
454 |
my $uid = $patron->userid; |
448 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
455 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
449 |
# In case user is a superlibrarian, editing is not restricted |
456 |
# In case user is a superlibrarian, editing is not restricted |
Lines 760-766
if ($op eq "additem") {
Link Here
|
760 |
if ($exist_itemnumber && $exist_itemnumber != $itemnumber) { |
767 |
if ($exist_itemnumber && $exist_itemnumber != $itemnumber) { |
761 |
push @errors,"barcode_not_unique"; |
768 |
push @errors,"barcode_not_unique"; |
762 |
} else { |
769 |
} else { |
763 |
my $item = Koha::Items->find($itemnumber ); |
|
|
764 |
my $newitem = ModItemFromMarc($itemtosave, $biblionumber, $itemnumber); |
770 |
my $newitem = ModItemFromMarc($itemtosave, $biblionumber, $itemnumber); |
765 |
$itemnumber = q{}; |
771 |
$itemnumber = q{}; |
766 |
my $olditemlost = $item->itemlost; |
772 |
my $olditemlost = $item->itemlost; |
Lines 878-887
foreach my $field (@fields) {
Link Here
|
878 |
|
884 |
|
879 |
if ( C4::Context->preference('EasyAnalyticalRecords') ) { |
885 |
if ( C4::Context->preference('EasyAnalyticalRecords') ) { |
880 |
foreach my $hostitemnumber (@hostitemnumbers) { |
886 |
foreach my $hostitemnumber (@hostitemnumbers) { |
881 |
my $item = Koha::Items->find( $hostitemnumber ); |
887 |
my $hostitem = Koha::Items->find( $hostitemnumber ); |
882 |
if ($this_row{itemnumber} eq $hostitemnumber) { |
888 |
if ($this_row{itemnumber} eq $hostitemnumber) { |
883 |
$this_row{hostitemflag} = 1; |
889 |
$this_row{hostitemflag} = 1; |
884 |
$this_row{hostbiblionumber}= $item->biblio->biblionumber; |
890 |
$this_row{hostbiblionumber}= $hostitem->biblio->biblionumber; |
885 |
last; |
891 |
last; |
886 |
} |
892 |
} |
887 |
} |
893 |
} |
888 |
- |
|
|