Lines 126-131
my ($template, $loggedinuser, $cookie)
Link Here
|
126 |
|
126 |
|
127 |
# Does the user have a restricted item editing permission? |
127 |
# Does the user have a restricted item editing permission? |
128 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
128 |
my $patron = Koha::Patrons->find( $loggedinuser ); |
|
|
129 |
|
130 |
my $item = $itemnumber ? Koha::Items->find( $itemnumber ) : undef; |
131 |
if ( $item && !$patron->can_edit_item( $item ) ) { |
132 |
print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); |
133 |
exit; |
134 |
} |
135 |
|
129 |
my $uid = $patron->userid; |
136 |
my $uid = $patron->userid; |
130 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
137 |
my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; |
131 |
# In case user is a superlibrarian, editing is not restricted |
138 |
# In case user is a superlibrarian, editing is not restricted |
Lines 468-474
if ($op eq "additem") {
Link Here
|
468 |
push @errors,"barcode_not_unique"; |
475 |
push @errors,"barcode_not_unique"; |
469 |
$current_item = $item->unblessed; # Restore edit form for the same item |
476 |
$current_item = $item->unblessed; # Restore edit form for the same item |
470 |
} else { |
477 |
} else { |
|
|
478 |
<<<<<<< HEAD |
471 |
my $newitemlost = $item->itemlost; |
479 |
my $newitemlost = $item->itemlost; |
|
|
480 |
======= |
481 |
my $newitem = ModItemFromMarc($itemtosave, $biblionumber, $itemnumber); |
482 |
$itemnumber = q{}; |
483 |
my $olditemlost = $item->itemlost; |
484 |
my $newitemlost = $newitem->{itemlost}; |
485 |
>>>>>>> 5b37193b6fe (Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item) |
472 |
if ( $newitemlost && $newitemlost ge '1' && !$olditemlost ) { |
486 |
if ( $newitemlost && $newitemlost ge '1' && !$olditemlost ) { |
473 |
LostItem( $item->itemnumber, 'additem' ); |
487 |
LostItem( $item->itemnumber, 'additem' ); |
474 |
} |
488 |
} |
475 |
- |
|
|