Bug 17600: Standardize our EXPORT_OK
[srvgit] / tools / upload-cover-image.pl
index 82b0bb5..f55d8f1 100755 (executable)
@@ -43,15 +43,13 @@ use File::Temp;
 use CGI qw ( -utf8 );
 use GD;
 use C4::Context;
-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::Biblios;
 use Koha::CoverImages;
 use Koha::Items;
 use Koha::UploadedFiles;
-use C4::Log;
-
-my $debug = 1;
+use C4::Log qw( logaction );
 
 my $input = CGI->new;
 
@@ -62,7 +60,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         flagsrequired   => { tools => 'upload_local_cover_images' },
-        debug           => 0,
     }
 );
 
@@ -162,7 +159,6 @@ if ($fileID) {
                           : ( $line =~ /,/ )  ? ","
                           :                     "";
 
-                        #$debug and warn "Delimeter is \'$delim\'";
                         unless ( $delim eq "," || $delim eq "\t" ) {
                             warn
 "Unrecognized or missing field delimeter. Please verify that you are using either a ',' or a 'tab'";