small fix
This commit is contained in:
parent
5619596659
commit
01e7ca06f7
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace ManiaControl\Settings;
|
namespace ManiaControl\Settings;
|
||||||
|
|
||||||
use ManiaControl\ManiaControl;
|
|
||||||
use ManiaControl\Callbacks\CallbackManager;
|
|
||||||
use ManiaControl\Callbacks\CallbackListener;
|
use ManiaControl\Callbacks\CallbackListener;
|
||||||
|
use ManiaControl\Callbacks\CallbackManager;
|
||||||
|
use ManiaControl\ManiaControl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class managing Settings and Configurations
|
* Class managing Settings and Configurations
|
||||||
@ -58,11 +58,7 @@ class SettingManager implements CallbackListener {
|
|||||||
private function initTables() {
|
private function initTables() {
|
||||||
$mysqli = $this->maniaControl->database->mysqli;
|
$mysqli = $this->maniaControl->database->mysqli;
|
||||||
$defaultType = "'" . self::TYPE_STRING . "'";
|
$defaultType = "'" . self::TYPE_STRING . "'";
|
||||||
$typeSet = $defaultType . ",'"
|
$typeSet = $defaultType . ",'" . self::TYPE_INT . "'" . ",'" . self::TYPE_REAL . "'" . ",'" . self::TYPE_BOOL . "'" . ",'" . self::TYPE_ARRAY . "'";
|
||||||
. self::TYPE_INT . "'" . ",'"
|
|
||||||
. self::TYPE_REAL . "'" . ",'"
|
|
||||||
. self::TYPE_BOOL . "'" . ",'"
|
|
||||||
. self::TYPE_ARRAY . "'";
|
|
||||||
$settingTableQuery = "CREATE TABLE IF NOT EXISTS `" . self::TABLE_SETTINGS . "` (
|
$settingTableQuery = "CREATE TABLE IF NOT EXISTS `" . self::TABLE_SETTINGS . "` (
|
||||||
`index` int(11) NOT NULL AUTO_INCREMENT,
|
`index` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`class` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
`class` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
@ -277,7 +273,7 @@ class SettingManager implements CallbackListener {
|
|||||||
}
|
}
|
||||||
$settingStatement->store_result();
|
$settingStatement->store_result();
|
||||||
if ($settingStatement->num_rows <= 0) {
|
if ($settingStatement->num_rows <= 0) {
|
||||||
$this->updateSetting($className, $settingName, $default);
|
$this->setSetting($className, $settingName, $default);
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
$settingStatement->bind_result($type, $value);
|
$settingStatement->bind_result($type, $value);
|
||||||
|
Loading…
Reference in New Issue
Block a user