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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user