Apply fixes from StyleCI

[ci skip] [skip ci]
This commit is contained in:
Sergio Brighenti 2021-08-16 11:56:07 +00:00 committed by StyleCI Bot
parent 3d248c8cb4
commit ee796c7ded
3 changed files with 13 additions and 7 deletions

View file

@ -27,8 +27,11 @@ class AdminController extends Controller
$settings[$setting->key] = $setting->value;
}
$settings['default_user_quota'] = humanFileSize($this->getSetting('default_user_quota', stringToBytes('1G')), 0,
true);
$settings['default_user_quota'] = humanFileSize(
$this->getSetting('default_user_quota', stringToBytes('1G')),
0,
true
);
return view()->render($response, 'dashboard/system.twig', [
'usersCount' => $usersCount = $this->database->query('SELECT COUNT(*) AS `count` FROM `users`')->fetch()->count,

View file

@ -101,11 +101,15 @@ class SettingController extends Controller
private function updateSetting($key, $value = null)
{
if (!$this->database->query('SELECT `value` FROM `settings` WHERE `key` = '.$this->database->getPdo()->quote($key))->fetch()) {
$this->database->query('INSERT INTO `settings`(`key`, `value`) VALUES ('.$this->database->getPdo()->quote($key).', ?)',
$value);
$this->database->query(
'INSERT INTO `settings`(`key`, `value`) VALUES ('.$this->database->getPdo()->quote($key).', ?)',
$value
);
} else {
$this->database->query('UPDATE `settings` SET `value`=? WHERE `key` = '.$this->database->getPdo()->quote($key),
$value);
$this->database->query(
'UPDATE `settings` SET `value`=? WHERE `key` = '.$this->database->getPdo()->quote($key),
$value
);
}
}
}

View file

@ -64,5 +64,4 @@ class Theme
{
return 'default|'.self::DEFAULT_THEME_URL;
}
}