ffzg/recall_notices.pl: added --interval and --dedup
[koha.git] / admin / import_export_framework.pl
index b2d090d..ad95804 100755 (executable)
@@ -18,8 +18,7 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 
-use strict;
-use warnings;
+use Modern::Perl;
 use CGI qw ( -utf8 );
 use CGI::Cookie;
 use C4::Context;
@@ -32,7 +31,7 @@ my ($auth_status, $sessionID);
 if (exists $cookies{'CGISESSID'}) {
     ($auth_status, $sessionID) = check_cookie_auth(
         $cookies{'CGISESSID'}->value,
-        { parameters => 'parameters_remaining_permissions' },
+        { parameters => 'manage_marc_frameworks' },
     );
 }
 if ($auth_status eq 'ok') {
@@ -84,7 +83,7 @@ if ($action eq 'export' && $input->request_method() eq 'GET') {
         my $extension = $1;
         my $uploadFd = $input->upload($fieldname);
         if ($uploadFd && !$input->cgi_error) {
-            my $tmpfilename = $input->tmpFileName($input->param($fieldname));
+            my $tmpfilename = $input->tmpFileName(scalar $input->param($fieldname));
             $filename = $tmpfilename . '.' . $extension; # rename the tmp file with the extension
             $ok = ImportFramework($filename, $frameworkcode, 1) if (rename($tmpfilename, $filename));
         }