Skip to content

Commit

Permalink
Proper redirect in popup when login fails.
Browse files Browse the repository at this point in the history
This corrects issue #10
  • Loading branch information
sebsauvage committed Mar 2, 2013
1 parent 858c5c2 commit 705f835
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ function ban_canLogin()
else
{
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;
}
}
Expand Down

0 comments on commit 705f835

Please sign in to comment.