# 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;
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') {
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));
}