|
Lines 446-451
my ($template, $loggedinuser, $cookie)
Link Here
|
| 446 |
|
446 |
|
| 447 |
# Does the user have a restricted item editing permission? |
447 |
# Does the user have a restricted item editing permission? |
| 448 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
448 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
|
|
449 |
|
| 450 |
my $item = $itemnumber ? Koha::Items->find( $itemnumber ) : undef; |
| 451 |
if ( $item && !$patron->can_edit_item( $item ) ) { |
| 452 |
print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); |
| 453 |
exit; |
| 454 |
} |
| 455 |
|
| 449 |
my $uid = $patron->userid; |
456 |
my $uid = $patron->userid; |
| 450 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
457 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
| 451 |
# In case user is a superlibrarian, editing is not restricted |
458 |
# 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 |
- |
|
|