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: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
78d4c42a61
commit
1022ad4c13
|
|
@ -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 ],
|
||||
|
|
|
|||
Loading…
Reference in New Issue