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