mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
Fix coding style part 2
This commit is contained in:
@@ -12,25 +12,20 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
if(!is_numeric($_POST['token_id']))
|
||||
{
|
||||
echo('error with data');
|
||||
exit;
|
||||
if (!is_numeric($_POST['token_id'])) {
|
||||
echo 'error with data';
|
||||
exit;
|
||||
}
|
||||
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 {
|
||||
if ($_POST['confirm'] == 'yes') {
|
||||
$delete = dbDelete('api_tokens', '`id` = ?', array($_POST['token_id']));
|
||||
if ($delete > '0') {
|
||||
echo 'API token has been removed';
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
echo 'An error occurred removing the API token';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo('An error occurred removing the API token');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}//end if
|
||||
|
||||
Reference in New Issue
Block a user