lmError(): return JSON if wanted (#1745)
This commit is contained in:
parent
c20c14ac95
commit
1186aba52b
|
@ -873,6 +873,15 @@ sub lmError {
|
|||
|
||||
# Check URL
|
||||
$self->controlUrl($req);
|
||||
$req->pdata( {} );
|
||||
|
||||
if ( $req->wantJSON ) {
|
||||
return $self->sendJSONresponse(
|
||||
$req,
|
||||
{ error => $httpError, result => 0 },
|
||||
code => $httpError
|
||||
);
|
||||
}
|
||||
|
||||
my %templateParams = (
|
||||
MAIN_LOGO => $self->conf->{portalMainLogo},
|
||||
|
@ -880,7 +889,6 @@ sub lmError {
|
|||
LOGOUT_URL => $self->conf->{portal} . "?logout=1",
|
||||
URL => $req->{urldc},
|
||||
);
|
||||
$req->pdata( {} );
|
||||
|
||||
# Error code
|
||||
$templateParams{"ERROR$_"} = ( $httpError == $_ ? 1 : 0 )
|
||||
|
|
Loading…
Reference in New Issue
Block a user