X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=misc%2Fcronjobs%2Fbatch_anonymise.pl;h=013f7d11799e4f3c1153db9aa0b77a0005459611;hb=7b5c8cbf079725381341cea5494717d58735ca9b;hp=857171b9682e7c0cec563d7286c5561ca489cac3;hpb=c0234dd9b9649063acf2617fecf5c6efda38a532;p=koha.git diff --git a/misc/cronjobs/batch_anonymise.pl b/misc/cronjobs/batch_anonymise.pl index 857171b968..013f7d1179 100755 --- a/misc/cronjobs/batch_anonymise.pl +++ b/misc/cronjobs/batch_anonymise.pl @@ -4,21 +4,22 @@ # # This file is part of Koha. # -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . use strict; use warnings; +use Carp; BEGIN { @@ -29,13 +30,13 @@ BEGIN { } use C4::Context; -use C4::Circulation; -use C4::Dates; +use Koha::Patrons; use Date::Calc qw( Today Add_Delta_Days ); use Getopt::Long; +use C4::Log; sub usage { print STDERR <search_patrons_to_anonymise( { before => $formatdate } )->anonymise_issue_history( { before => $formatdate } ); +$verbose and print int($rows) . " checkouts anonymised.\n"; exit(0);