use CGI qw ( -utf8 );
use Koha::Database;
-use C4::Auth;
-use C4::Biblio;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
use Koha::BiblioFrameworks;
use Koha::Caches;
use Koha::MarcSubfieldStructures;
-my $input = new CGI;
+my $input = CGI->new;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
{
template_name => "admin/koha2marclinks.tt",
query => $input,
type => "intranet",
- authnotrequired => 0,
- flagsrequired => { parameters => 'parameters_remaining_permissions' },
- debug => 1,
+ flagsrequired => { parameters => 'manage_marc_frameworks' },
}
);
foreach my $col ( @cols ) {
my $found;
my $readonly = $col =~ /\.(biblio|biblioitem|item)number$/;
- foreach my $row ( $kohafields->search({ kohafield => $col }) ) {
+ foreach my $row ( $kohafields->search({ kohafield => $col })->as_list ) {
$found = 1;
push @loop_data, {
kohafield => $col,