Convert About page to Laravel (#10551)

* Convert About page to laravel

* clean up callback stuff

* More translatable strings
This commit is contained in:
Jellyfrog
2019-08-24 23:52:10 +02:00
committed by Tony Murray
parent 25ee86c9ad
commit 47e4641e04
12 changed files with 469 additions and 260 deletions

View File

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