PSR2 Cleanup: /html edition

Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
This commit is contained in:
Tony Murray
2016-08-18 20:28:22 -05:00
parent f0c82498b5
commit 8c639aa5a4
468 changed files with 6605 additions and 7629 deletions

View File

@@ -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');