1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Sort languages in Admin Navigation. Removed false positive from language-checker error detection. Improved admin login error handling.

This commit is contained in:
Cameron
2015-09-05 20:02:51 -07:00
parent 72c93e93a2
commit de49a2cce9
5 changed files with 39 additions and 9 deletions

View File

@@ -127,7 +127,7 @@ else
{
$admin_log->e_log_event(4, __FILE__."|".__FUNCTION__."@".__LINE__, "LOGIN", LAN_ROLL_LOG_11, "U: ".$tp->toDB($_POST['authname']), FALSE, LOG_TO_ROLLING);
echo "<script type='text/javascript'>document.location.href='../index.php'</script>\n";
// header("location: ../index.php");
e107::getRedirect()->redirect('admin.php?failed');
exit;
}
@@ -294,11 +294,31 @@ class auth
// NOTE: this should NOT be a template of the admin-template, however themes may style it using css.
$class = (e_QUERY == 'failed') ? "class='e-shake'" : "";
$text = "<form id='admin-login' method='post' action='".e_SELF."' {$incChap} >
<div id='logo' ><img src='".e_IMAGE."logo_template_large.png' alt='login' /></div>
<div id='login-admin' class='center'>
<div {$class}>
<div>";
if(e_QUERY == 'failed')
{
e107::lan('core', 'login');
$text .= "<div class='alert alert-danger'>".LAN_LOGIN_21."</div>";
$text .= "<script type='text/javascript'>
window.setTimeout(function() {
$('.alert').fadeTo(500, 0).slideUp(500, function(){
$(this).remove();
});
}, 5000);
</script>";
}
$text .= "
<div class='panel well panel-primary'>
<div class='panel-heading'><h3 class='panel-title'>".LAN_HEADER_04."</h3></div>
@@ -424,6 +444,7 @@ class auth
{
return $row;
}
}
}
return array("authfail", "reason"=>$reason);