Bug 30878: Avoid resetting waiting reserves tab
[koha-ffzg.git] / admin / audio_alerts.pl
index 1ee2e4c..e28151b 100755 (executable)
 use Modern::Perl;
 
 use CGI;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::AudioAlert;
 use Koha::AudioAlerts;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $selector = $cgi->param('selector');
 my $sound    = $cgi->param('sound');
@@ -39,9 +39,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         template_name   => "admin/audio_alerts.tt",
         query           => $cgi,
         type            => "intranet",
-        authnotrequired => 0,
         flagsrequired   => { parameters => 'manage_audio_alerts' },
-        debug           => 1,
     }
 );
 
@@ -63,6 +61,6 @@ if (@delete) {
     Koha::AudioAlerts->fix_precedences();
 }
 
-$template->param( AudioAlertsPage => 1, audio_alerts => scalar Koha::AudioAlerts->search() );
+$template->param( AudioAlertsPage => 1, audio_alerts => Koha::AudioAlerts->search() );
 
 output_html_with_http_headers $cgi, $cookie, $template->output;