@@ -, +, @@ automatic_linker.pl --- cataloguing/automatic_linker.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/cataloguing/automatic_linker.pl +++ a/cataloguing/automatic_linker.pl @@ -32,7 +32,7 @@ print $input->header('application/json'); # Check the user's permissions my %cookies = fetch CGI::Cookie; my $sessid = $cookies{'CGISESSID'}->value || $input->param('CGISESSID'); -my ($auth_status, $auth_sessid) = C4::Auth::check_cookie_auth($sessid, {"catalogue"}); +my ($auth_status, $auth_sessid) = C4::Auth::check_cookie_auth($sessid, {catalogue => 1}); if ($auth_status ne "ok") { print to_json({status => 'UNAUTHORIZED'}); exit 0; @@ -47,7 +47,6 @@ if ($auth_status ne "ok") { my $json; -my @params = $input->param(); my $record = TransformHtmlToMarc( $input ); @@ -62,7 +61,7 @@ if ($@) { } my $linker = $linker_module->new( { 'options' => C4::Context->preference("LinkerOptions") } ); -my ( $headings_changed, $results ) = LinkBibHeadingsToAuthorities( $linker, $record, $params['frameworkcode'], C4::Context->preference("CatalogModuleRelink") || '', 1 ); +my ( $headings_changed, $results ) = LinkBibHeadingsToAuthorities( $linker, $record, $input->param('frameworkcode'), C4::Context->preference("CatalogModuleRelink") || '', 1 ); $json->{status} = 'OK'; $json->{links} = $results->{details} || ''; --