mirror of
https://github.com/e107inc/e107.git
synced 2025-07-12 10:36:20 +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:
@ -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);
|
$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";
|
echo "<script type='text/javascript'>document.location.href='../index.php'</script>\n";
|
||||||
// header("location: ../index.php");
|
|
||||||
e107::getRedirect()->redirect('admin.php?failed');
|
e107::getRedirect()->redirect('admin.php?failed');
|
||||||
exit;
|
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.
|
// 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'" : "";
|
$class = (e_QUERY == 'failed') ? "class='e-shake'" : "";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$text = "<form id='admin-login' method='post' action='".e_SELF."' {$incChap} >
|
$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='logo' ><img src='".e_IMAGE."logo_template_large.png' alt='login' /></div>
|
||||||
<div id='login-admin' class='center'>
|
<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 well panel-primary'>
|
||||||
<div class='panel-heading'><h3 class='panel-title'>".LAN_HEADER_04."</h3></div>
|
<div class='panel-heading'><h3 class='panel-title'>".LAN_HEADER_04."</h3></div>
|
||||||
|
|
||||||
@ -424,6 +444,7 @@ class auth
|
|||||||
{
|
{
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return array("authfail", "reason"=>$reason);
|
return array("authfail", "reason"=>$reason);
|
||||||
|
@ -1433,17 +1433,17 @@ class lancheck
|
|||||||
$error[] = $def. ": Missing [ and/or ] character(s)";
|
$error[] = $def. ": Missing [ and/or ] character(s)";
|
||||||
}
|
}
|
||||||
|
|
||||||
if((strpos($eng_line,"--LINK--")!==FALSE && strpos($trans_line,"--LINK--")==FALSE))
|
if((strpos($eng_line,"--LINK--")!==false && strpos($trans_line,"--LINK--")===false))
|
||||||
{
|
{
|
||||||
$error[] = $def. ": Missing --LINK--";
|
$error[] = $def. ": Missing --LINK--";
|
||||||
}
|
}
|
||||||
|
|
||||||
if((strpos($eng_line,"e107.org")!==FALSE && strpos($trans_line,"e107.org")==FALSE))
|
if((strpos($eng_line,"e107.org")!==false && strpos($trans_line,"e107.org")===false))
|
||||||
{
|
{
|
||||||
$error[] = $def. ": Missing e107.org URL";
|
$error[] = $def. ": Missing e107.org URL";
|
||||||
}
|
}
|
||||||
|
|
||||||
if((strpos($eng_line,"e107coders.org")!==FALSE && strpos($trans_line,"e107coders.org")==FALSE))
|
if((strpos($eng_line,"e107coders.org")!==FALSE && strpos($trans_line,"e107coders.org")===false))
|
||||||
{
|
{
|
||||||
$error[] = $def. ": Missing e107coders.org URL";
|
$error[] = $def. ": Missing e107coders.org URL";
|
||||||
}
|
}
|
||||||
|
@ -1388,7 +1388,7 @@ Inverse 10 <span class="badge badge-inverse">10</span>
|
|||||||
return e107::getNav()->admin('', '', $menu_vars, $$tmpl, FALSE, FALSE);
|
return e107::getNav()->admin('', '', $menu_vars, $$tmpl, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// MAIN LINK
|
// MAIN LINK
|
||||||
if($parm != 'no-main')
|
if($parm != 'no-main')
|
||||||
@ -1581,7 +1581,7 @@ Inverse 10 <span class="badge badge-inverse">10</span>
|
|||||||
|
|
||||||
|
|
||||||
// Clean up - remove empty main sections
|
// Clean up - remove empty main sections
|
||||||
foreach ($menu_vars as $_m => $_d)
|
foreach ($menu_vars as $_m => $_d)
|
||||||
{
|
{
|
||||||
if(!isset($_d['sub']) || empty($_d['sub']))
|
if(!isset($_d['sub']) || empty($_d['sub']))
|
||||||
{
|
{
|
||||||
@ -1750,6 +1750,8 @@ Inverse 10 <span class="badge badge-inverse">10</span>
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort($languages);
|
||||||
|
|
||||||
if(count($languages) > 1)
|
if(count($languages) > 1)
|
||||||
{
|
{
|
||||||
|
@ -12,13 +12,14 @@ if (!defined('e107_INIT')) { exit; }
|
|||||||
|
|
||||||
$pref = e107::getPref();
|
$pref = e107::getPref();
|
||||||
|
|
||||||
|
|
||||||
if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SELF,"tinymce4/admin_config.php") )
|
if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SELF,"tinymce4/admin_config.php") )
|
||||||
{
|
{
|
||||||
if(e_PAGE != 'image.php')
|
if(e_PAGE != 'image.php')
|
||||||
{
|
{
|
||||||
//e107::js('tinymce','tiny_mce.js','jquery');
|
//e107::js('tinymce','tiny_mce.js','jquery');
|
||||||
//e107::js('tinymce','wysiwyg.php','jquery',5);
|
//e107::js('tinymce','wysiwyg.php','jquery',5);
|
||||||
|
// e107::js('footer', "https://tinymce.cachefly.net/4.2/tinymce.min.js");
|
||||||
e107::js('footer', "https://tinymce.cachefly.net/4.0/tinymce.min.js"); // 4.1 and 4.2 have issues with saving under Firefox. http://www.tinymce.com/develop/bugtracker_view.php?id=7655
|
e107::js('footer', "https://tinymce.cachefly.net/4.0/tinymce.min.js"); // 4.1 and 4.2 have issues with saving under Firefox. http://www.tinymce.com/develop/bugtracker_view.php?id=7655
|
||||||
e107::js('footer',e_PLUGIN.'tinymce4/wysiwyg.php','jquery',5);
|
e107::js('footer',e_PLUGIN.'tinymce4/wysiwyg.php','jquery',5);
|
||||||
|
|
||||||
|
@ -143,6 +143,12 @@ table label.checkbox { margin-left: 20px }
|
|||||||
#admin-ui-edit { }
|
#admin-ui-edit { }
|
||||||
#admin-ui-edit-db-language { margin-bottom: -30px; padding-bottom:5px; padding-right:5px }
|
#admin-ui-edit-db-language { margin-bottom: -30px; padding-bottom:5px; padding-right:5px }
|
||||||
|
|
||||||
|
#admin-ui-list-db-language span,
|
||||||
|
#admin-ui-edit-db-language span { color: #FAA732; cursor: help; }
|
||||||
|
|
||||||
|
#admin-ui-edit-db-language span.default,
|
||||||
|
#admin-ui-list-db-language span.default { color: white }
|
||||||
|
|
||||||
td.options .btn-group { display: flex; }
|
td.options .btn-group { display: flex; }
|
||||||
|
|
||||||
.table .nav-tabs a,
|
.table .nav-tabs a,
|
||||||
|
Reference in New Issue
Block a user