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

@@ -13,22 +13,20 @@
*/
header('Content-type: text/plain');
if(is_admin() === false) {
if (is_admin() === false) {
die('ERROR: You need to be admin');
}
if (!is_numeric($_POST['token_id'])) {
echo 'error with data';
exit;
}
else {
} else {
if ($_POST['confirm'] == 'yes') {
$delete = dbDelete('api_tokens', '`id` = ?', array($_POST['token_id']));
if ($delete > '0') {
echo 'API token has been removed';
exit;
}
else {
} else {
echo 'An error occurred removing the API token';
exit;
}