|
Lines 436-441
my ($template, $loggedinuser, $cookie)
Link Here
|
| 436 |
|
436 |
|
| 437 |
# Does the user have a restricted item editing permission? |
437 |
# Does the user have a restricted item editing permission? |
| 438 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
438 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
|
|
439 |
|
| 440 |
my $item = $itemnumber ? Koha::Items->find( $itemnumber ) : undef; |
| 441 |
if ( $item && !$patron->can_edit_item( $item ) ) { |
| 442 |
print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); |
| 443 |
exit; |
| 444 |
} |
| 445 |
|
| 439 |
my $uid = $patron->userid; |
446 |
my $uid = $patron->userid; |
| 440 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
447 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
| 441 |
# In case user is a superlibrarian, editing is not restricted |
448 |
# In case user is a superlibrarian, editing is not restricted |
|
Lines 750-756
if ($op eq "additem") {
Link Here
|
| 750 |
if ($exist_itemnumber && $exist_itemnumber != $itemnumber) { |
757 |
if ($exist_itemnumber && $exist_itemnumber != $itemnumber) { |
| 751 |
push @errors,"barcode_not_unique"; |
758 |
push @errors,"barcode_not_unique"; |
| 752 |
} else { |
759 |
} else { |
| 753 |
my $item = Koha::Items->find($itemnumber ); |
|
|
| 754 |
my $newitem = ModItemFromMarc($itemtosave, $biblionumber, $itemnumber); |
760 |
my $newitem = ModItemFromMarc($itemtosave, $biblionumber, $itemnumber); |
| 755 |
$itemnumber = q{}; |
761 |
$itemnumber = q{}; |
| 756 |
my $olditemlost = $item->itemlost; |
762 |
my $olditemlost = $item->itemlost; |
|
Lines 868-877
foreach my $field (@fields) {
Link Here
|
| 868 |
|
874 |
|
| 869 |
if ( C4::Context->preference('EasyAnalyticalRecords') ) { |
875 |
if ( C4::Context->preference('EasyAnalyticalRecords') ) { |
| 870 |
foreach my $hostitemnumber (@hostitemnumbers) { |
876 |
foreach my $hostitemnumber (@hostitemnumbers) { |
| 871 |
my $item = Koha::Items->find( $hostitemnumber ); |
877 |
my $hostitem = Koha::Items->find( $hostitemnumber ); |
| 872 |
if ($this_row{itemnumber} eq $hostitemnumber) { |
878 |
if ($this_row{itemnumber} eq $hostitemnumber) { |
| 873 |
$this_row{hostitemflag} = 1; |
879 |
$this_row{hostitemflag} = 1; |
| 874 |
$this_row{hostbiblionumber}= $item->biblio->biblionumber; |
880 |
$this_row{hostbiblionumber}= $hostitem->biblio->biblionumber; |
| 875 |
last; |
881 |
last; |
| 876 |
} |
882 |
} |
| 877 |
} |
883 |
} |
| 878 |
- |
|
|