|
Lines 31-37
use Koha::Patron;
Link Here
|
| 31 |
use Koha::Exceptions::Patron; |
31 |
use Koha::Exceptions::Patron; |
| 32 |
use Koha::Patron::Categories; |
32 |
use Koha::Patron::Categories; |
| 33 |
use Date::Calc qw( Today Add_Delta_YMD ); |
33 |
use Date::Calc qw( Today Add_Delta_YMD ); |
| 34 |
use Koha::Item::LastPatrons; |
|
|
| 35 |
|
34 |
|
| 36 |
use base qw(Koha::Objects); |
35 |
use base qw(Koha::Objects); |
| 37 |
|
36 |
|
|
Lines 140-146
sub search_patrons_to_anonymise {
Link Here
|
| 140 |
my ( $class, $params ) = @_; |
139 |
my ( $class, $params ) = @_; |
| 141 |
my $older_than_date = $params->{before}; |
140 |
my $older_than_date = $params->{before}; |
| 142 |
my $library = $params->{library}; |
141 |
my $library = $params->{library}; |
| 143 |
|
|
|
| 144 |
$older_than_date = $older_than_date ? dt_from_string($older_than_date) : dt_from_string; |
142 |
$older_than_date = $older_than_date ? dt_from_string($older_than_date) : dt_from_string; |
| 145 |
$library ||= |
143 |
$library ||= |
| 146 |
( C4::Context->preference('IndependentBranches') && C4::Context->userenv && !C4::Context->IsSuperLibrarian() && C4::Context->userenv->{branch} ) |
144 |
( C4::Context->preference('IndependentBranches') && C4::Context->userenv && !C4::Context->IsSuperLibrarian() && C4::Context->userenv->{branch} ) |
| 147 |
- |
|
|