mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Convert About page to Laravel (#10551)
* Convert About page to laravel * clean up callback stuff * More translatable strings
This commit is contained in:
@@ -18,14 +18,4 @@ if (!Auth::user()->hasGlobalAdmin()) {
|
||||
die('ERROR: You need to be admin');
|
||||
}
|
||||
|
||||
if ($_POST['state'] == 'true') {
|
||||
$state = 1;
|
||||
} elseif ($_POST['state'] == 'false') {
|
||||
$state = 0;
|
||||
} else {
|
||||
$state = 0;
|
||||
}
|
||||
|
||||
if (dbUpdate(array('value' => $state), 'callback', '`name` = "enabled"', array()) == 0) {
|
||||
dbInsert(array('value' => $state,'name' => 'enabled'), 'callback');
|
||||
}
|
||||
\App\Models\Callback::set('enabled', (int)($_POST['state'] == 'true'));
|
||||
|
||||
Reference in New Issue
Block a user