Lines 431-436
my ($template, $loggedinuser, $cookie)
Link Here
|
431 |
|
431 |
|
432 |
# Does the user have a restricted item editing permission? |
432 |
# Does the user have a restricted item editing permission? |
433 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
433 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
|
|
434 |
|
435 |
my $item = $itemnumber ? Koha::Items->find( $itemnumber ) : undef; |
436 |
if ( $item && !$patron->can_edit_item( $item ) ) { |
437 |
print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); |
438 |
exit; |
439 |
} |
440 |
|
434 |
my $uid = $patron->userid; |
441 |
my $uid = $patron->userid; |
435 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
442 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
436 |
# In case user is a superlibrarian, editing is not restricted |
443 |
# In case user is a superlibrarian, editing is not restricted |
Lines 745-751
if ($op eq "additem") {
Link Here
|
745 |
if ($exist_itemnumber && $exist_itemnumber != $itemnumber) { |
752 |
if ($exist_itemnumber && $exist_itemnumber != $itemnumber) { |
746 |
push @errors,"barcode_not_unique"; |
753 |
push @errors,"barcode_not_unique"; |
747 |
} else { |
754 |
} else { |
748 |
my $item = Koha::Items->find($itemnumber ); |
|
|
749 |
my $newitem = ModItemFromMarc($itemtosave, $biblionumber, $itemnumber); |
755 |
my $newitem = ModItemFromMarc($itemtosave, $biblionumber, $itemnumber); |
750 |
$itemnumber = q{}; |
756 |
$itemnumber = q{}; |
751 |
my $olditemlost = $item->itemlost; |
757 |
my $olditemlost = $item->itemlost; |
Lines 855-864
foreach my $field (@fields) {
Link Here
|
855 |
|
861 |
|
856 |
if ( C4::Context->preference('EasyAnalyticalRecords') ) { |
862 |
if ( C4::Context->preference('EasyAnalyticalRecords') ) { |
857 |
foreach my $hostitemnumber (@hostitemnumbers) { |
863 |
foreach my $hostitemnumber (@hostitemnumbers) { |
858 |
my $item = Koha::Items->find( $hostitemnumber ); |
864 |
my $hostitem = Koha::Items->find( $hostitemnumber ); |
859 |
if ($this_row{itemnumber} eq $hostitemnumber) { |
865 |
if ($this_row{itemnumber} eq $hostitemnumber) { |
860 |
$this_row{hostitemflag} = 1; |
866 |
$this_row{hostitemflag} = 1; |
861 |
$this_row{hostbiblionumber}= $item->biblio->biblionumber; |
867 |
$this_row{hostbiblionumber}= $hostitem->biblio->biblionumber; |
862 |
last; |
868 |
last; |
863 |
} |
869 |
} |
864 |
} |
870 |
} |
865 |
- |
|
|