|
Lines 20-27
use Modern::Perl;
Link Here
|
| 20 |
use base qw(Koha::Object); |
20 |
use base qw(Koha::Object); |
| 21 |
|
21 |
|
| 22 |
use Koha::Biblio; |
22 |
use Koha::Biblio; |
|
|
23 |
use Koha::Biblios; |
| 23 |
use Koha::Exceptions; |
24 |
use Koha::Exceptions; |
| 24 |
use Koha::Item; |
25 |
use Koha::Item; |
|
|
26 |
use Koha::Old::Biblios; |
| 25 |
use Koha::SearchEngine::Indexer; |
27 |
use Koha::SearchEngine::Indexer; |
| 26 |
|
28 |
|
| 27 |
=head1 NAME |
29 |
=head1 NAME |
|
Lines 34-39
Koha::Old::Item - Koha Old::Item Object class
Link Here
|
| 34 |
|
36 |
|
| 35 |
=cut |
37 |
=cut |
| 36 |
|
38 |
|
|
|
39 |
=head3 biblio |
| 40 |
|
| 41 |
my $biblio = $deleted_item->biblio; |
| 42 |
|
| 43 |
Returns the Koha::Biblio or Koha::Old::Biblio object for this item, |
| 44 |
checking first in the biblio table and then in deletedbiblio table. |
| 45 |
|
| 46 |
=cut |
| 47 |
|
| 48 |
sub biblio { |
| 49 |
my ($self) = @_; |
| 50 |
|
| 51 |
my $biblio = Koha::Biblios->find( $self->biblionumber ); |
| 52 |
return $biblio if $biblio; |
| 53 |
|
| 54 |
return Koha::Old::Biblios->find( $self->biblionumber ); |
| 55 |
} |
| 56 |
|
| 37 |
=head3 restore |
57 |
=head3 restore |
| 38 |
|
58 |
|
| 39 |
my $item = $deleted_item->restore; |
59 |
my $item = $deleted_item->restore; |