Bug 42084: (QA follow-up) Simplify

Since this is an intranet svc script (called in intranet js), there
is no need to check the session.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Marcel de Rooy 2026-05-22 10:13:49 +02:00 committed by Pedro Amorim
parent cb058d68fd
commit 6aa37a8430
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 1 additions and 12 deletions

View File

@ -24,8 +24,6 @@ use C4::Context;
use C4::Service;
use C4::Log;
use Koha::Token;
use CGI::Cookie;
use C4::Auth qw( get_session );
=head1 NAME
@ -147,16 +145,7 @@ sub set_preferences {
C4::Service->return_success($response);
}
my %cookies = CGI::Cookie->fetch;
if ( exists $cookies{'CGISESSID'} ) {
my $sessionID = $cookies{'CGISESSID'}->value;
if ($sessionID) {
my $session = get_session($sessionID);
C4::Context->interface( $session->param('interface') ) if ($session);
}
}
C4::Context->interface('intranet');
C4::Service->dispatch(
[ 'POST /([A-Za-z0-9_-]+)', ['value'], \&set_preference ],
[ 'POST /', [], \&set_preferences ],