From bd128429a55baa8ca872526717e9feb01f360c48 Mon Sep 17 00:00:00 2001 From: Blou Date: Thu, 16 Apr 2015 11:57:14 -0400 Subject: [PATCH] Bug 11299 - cleaning up warnings/errors appearing in automatic_linker.pl Signed-off-by: Tadeasm --- cataloguing/automatic_linker.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cataloguing/automatic_linker.pl b/cataloguing/automatic_linker.pl index d99e9f3..a853398 100755 --- a/cataloguing/automatic_linker.pl +++ b/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} || ''; -- 2.1.4