mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
PSR2 Cleanup: /html edition
Travis tests for code conformance. Ignore warnings for now. Fixed all errors, left most warnings.
This commit is contained in:
@@ -40,8 +40,7 @@ if ($vars['page'] == 'logout' && $_SESSION['authenticated']) {
|
||||
if (isset($_POST['username']) && isset($_POST['password'])) {
|
||||
$_SESSION['username'] = mres($_POST['username']);
|
||||
$_SESSION['password'] = $_POST['password'];
|
||||
}
|
||||
else if (isset($_GET['username']) && isset($_GET['password'])) {
|
||||
} elseif (isset($_GET['username']) && isset($_GET['password'])) {
|
||||
$_SESSION['username'] = mres($_GET['username']);
|
||||
$_SESSION['password'] = $_GET['password'];
|
||||
}
|
||||
@@ -52,8 +51,7 @@ if (!isset($config['auth_mechanism'])) {
|
||||
|
||||
if (file_exists('includes/authentication/'.$config['auth_mechanism'].'.inc.php')) {
|
||||
include_once 'includes/authentication/'.$config['auth_mechanism'].'.inc.php';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
print_error('ERROR: no valid auth_mechanism defined!');
|
||||
exit();
|
||||
}
|
||||
@@ -104,8 +102,7 @@ if ((isset($_SESSION['username'])) || (isset($_COOKIE['sess_id'],$_COOKIE['token
|
||||
header('Location: '.$_SERVER['REQUEST_URI'], true, 303);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else if (isset($_SESSION['username'])) {
|
||||
} elseif (isset($_SESSION['username'])) {
|
||||
$auth_message = 'Authentication Failed';
|
||||
unset($_SESSION['authenticated']);
|
||||
dbInsert(array('user' => $_SESSION['username'], 'address' => get_client_ip(), 'result' => 'Authentication Failure'), 'authlog');
|
||||
|
Reference in New Issue
Block a user