Proper redirect in popup when login fails.
This corrects issue https://github.com/sebsauvage/Shaarli/issues/10
This commit is contained in:
parent
858c5c2b43
commit
705f8355a9
1 changed files with 3 additions and 1 deletions
|
@ -410,7 +410,9 @@ function ban_canLogin()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ban_loginFailed();
|
ban_loginFailed();
|
||||||
echo '<script language="JavaScript">alert("Wrong login/password.");document.location=\'?do=login\';</script>'; // Redirect to login screen.
|
$redir = '';
|
||||||
|
if (isset($_GET['post'])) { $redir = '&post='.urlencode($_GET['post']).(!empty($_GET['title'])?'&title='.urlencode($_GET['title']):'').(!empty($_GET['source'])?'&source='.urlencode($_GET['source']):''); }
|
||||||
|
echo '<script language="JavaScript">alert("Wrong login/password.");document.location=\'?do=login'.$redir.'\';</script>'; // Redirect to login screen.
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue