|
Lines 688-696
sub HoldTitle {
Link Here
|
| 688 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
688 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
| 689 |
return { code => 'PatronNotFound' } unless $patron; |
689 |
return { code => 'PatronNotFound' } unless $patron; |
| 690 |
|
690 |
|
|
|
691 |
|
| 691 |
# If borrower is restricted return an error code |
692 |
# If borrower is restricted return an error code |
| 692 |
return { code => 'PatronRestricted' } if $patron->is_debarred; |
693 |
return { code => 'PatronRestricted' } if $patron->is_debarred; |
| 693 |
|
694 |
|
|
|
695 |
# Check for patron expired, category and syspref settings |
| 696 |
return { code => 'PatronExpired' } if ($patron->category->effective_BlockExpiredPatronOpacActions && $patron->is_expired); |
| 697 |
|
| 694 |
# Get the biblio record, or return an error code |
698 |
# Get the biblio record, or return an error code |
| 695 |
my $biblionumber = $cgi->param('bib_id'); |
699 |
my $biblionumber = $cgi->param('bib_id'); |
| 696 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
700 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
|
Lines 787-792
sub HoldItem {
Link Here
|
| 787 |
# If borrower is restricted return an error code |
791 |
# If borrower is restricted return an error code |
| 788 |
return { code => 'PatronRestricted' } if $patron->is_debarred; |
792 |
return { code => 'PatronRestricted' } if $patron->is_debarred; |
| 789 |
|
793 |
|
|
|
794 |
# Check for patron expired, category and syspref settings |
| 795 |
return { code => 'PatronExpired' } if ($patron->category->effective_BlockExpiredPatronOpacActions && $patron->is_expired); |
| 796 |
|
| 790 |
# Get the biblio or return an error code |
797 |
# Get the biblio or return an error code |
| 791 |
my $biblionumber = $cgi->param('bib_id'); |
798 |
my $biblionumber = $cgi->param('bib_id'); |
| 792 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
799 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
| 793 |
- |
|
|