Bug 28759: limit accessibility for "Manage API keys"
[koha-ffzg.git] / tools / cleanborrowers.pl
index 354c315..add68a2 100755 (executable)
@@ -34,18 +34,15 @@ This script allows to do 2 things.
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Members;
-use C4::Circulation;    # AnonymiseIssueHistory.
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Members qw( GetBorrowersToExpunge );
 use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patron::Categories;
 use Koha::Patrons;
-use Date::Calc qw/Today Add_Delta_YM/;
-use Koha::Patrons;
-use Koha::List::Patron;
+use Koha::List::Patron qw( GetPatronLists );
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 # Fetch the paramater list as a hash in scalar context:
 #  * returns paramater list as tied hash ref
@@ -178,7 +175,7 @@ elsif ( $step == 3 ) {
     $template->param( patron_lists => [ @non_empty_lists ] );
 }
 
-my $patron_categories = Koha::Patron::Categories->search_limited({}, {order_by => ['description']});
+my $patron_categories = Koha::Patron::Categories->search_with_library_limits({}, {order_by => ['description']});
 
 $template->param(
     step                   => $step,