diff options
author | Sebastien SAUVAGE <sebsauvage@sebsauvage.net> | 2013-03-02 14:07:00 +0100 |
---|---|---|
committer | Sebastien SAUVAGE <sebsauvage@sebsauvage.net> | 2013-03-02 14:07:00 +0100 |
commit | 705f8355a95c899c154ba08a159c2d4840fd8c98 (patch) | |
tree | 17829ff8d94aa67299d70055bff1146e3eb8b546 /index.php | |
parent | 858c5c2b43ce16f6d4b388725ef2d7a95e4a1986 (diff) | |
download | Shaarli-705f8355a95c899c154ba08a159c2d4840fd8c98.tar.gz Shaarli-705f8355a95c899c154ba08a159c2d4840fd8c98.tar.zst Shaarli-705f8355a95c899c154ba08a159c2d4840fd8c98.zip |
Proper redirect in popup when login fails.
This corrects issue https://github.com/sebsauvage/Shaarli/issues/10
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -410,7 +410,9 @@ if (isset($_POST['login'])) | |||
410 | else | 410 | else |
411 | { | 411 | { |
412 | ban_loginFailed(); | 412 | ban_loginFailed(); |
413 | echo '<script language="JavaScript">alert("Wrong login/password.");document.location=\'?do=login\';</script>'; // Redirect to login screen. | 413 | $redir = ''; |
414 | if (isset($_GET['post'])) { $redir = '&post='.urlencode($_GET['post']).(!empty($_GET['title'])?'&title='.urlencode($_GET['title']):'').(!empty($_GET['source'])?'&source='.urlencode($_GET['source']):''); } | ||
415 | echo '<script language="JavaScript">alert("Wrong login/password.");document.location=\'?do=login'.$redir.'\';</script>'; // Redirect to login screen. | ||
414 | exit; | 416 | exit; |
415 | } | 417 | } |
416 | } | 418 | } |