Bug 17600: Standardize our EXPORT_OK
[srvgit] / admin / item_circulation_alerts.pl
index ea8b4e9..67b71a3 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use File::Basename;
-use Encode;
-use JSON;
+use JSON qw( encode_json );
 #use Data::Dump 'pp';
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
 use C4::ItemCirculationAlertPreference;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::ItemTypes;
 use Koha::Patron::Categories;
@@ -43,14 +41,13 @@ sub show {
             template_name   => "admin/item_circulation_alerts.tt",
             query           => $input,
             type            => "intranet",
-            authnotrequired => 0,
-            flagsrequired   => { parameters => 'parameters_remaining_permissions' },
+            flagsrequired   => { parameters => 'item_circ_alerts' },
             debug           => defined($input->param('debug')),
         }
     );
 
     my $branch   = $input->param('branch') || '*';
-    my @categories = Koha::Patron::Categories->search_limited;
+    my @categories = Koha::Patron::Categories->search_with_library_limits;
     my @item_types = Koha::ItemTypes->search;
     my $grid_checkout = $preferences->grid({ branchcode => $branch, notification => 'CHECKOUT' });
     my $grid_checkin  = $preferences->grid({ branchcode => $branch, notification => 'CHECKIN' });
@@ -112,7 +109,7 @@ sub dispatch {
         show   => \&show,
         toggle => \&toggle,
     );
-    my $input  = new CGI;
+    my $input  = CGI->new;
     my $action = $input->param('action') || 'show';
     if (not exists $handler{$action}) {
         my $status = 400;