diff --git a/Admin/Install/db.json b/Admin/Install/db.json index fbacfc2..81afdb9 100644 --- a/Admin/Install/db.json +++ b/Admin/Install/db.json @@ -340,43 +340,6 @@ } } }, - "country": { - "name": "country", - "fields": { - "country_id": { - "name": "country_id", - "type": "INT", - "null": false, - "primary": true, - "autoincrement": true - }, - "country_name": { - "name": "country_name", - "type": "VARCHAR(100)", - "null": false - }, - "country_native": { - "name": "country_native", - "type": "VARCHAR(100)", - "null": false - }, - "country_code2": { - "name": "country_code2", - "type": "VARCHAR(2)", - "null": false - }, - "country_code3": { - "name": "country_code3", - "type": "VARCHAR(3)", - "null": false - }, - "country_codenum": { - "name": "country_codenum", - "type": "INT(11)", - "null": false - } - } - }, "account": { "name": "account", "fields": { @@ -568,36 +531,6 @@ } } }, - "account_settings": { - "name": "account_settings", - "fields": { - "account_settings_id": { - "name": "account_settings_id", - "type": "INT", - "null": false, - "primary": true, - "autoincrement": true - }, - "account_settings_name": { - "name": "account_settings_name", - "type": "VARCHAR(30)", - "null": false, - "unique": true - }, - "account_settings_content": { - "name": "account_settings_content", - "type": "VARCHAR(250)", - "null": false - }, - "account_settings_account": { - "name": "account_settings_account", - "type": "INT", - "null": false, - "foreignTable": "account", - "foreignKey": "account_id" - } - } - }, "settings": { "name": "settings", "fields": { @@ -635,6 +568,14 @@ "null": true, "foreignTable": "group", "foreignKey": "group_id" + }, + "settings_account": { + "name": "settings_account", + "type": "INT", + "default": null, + "null": true, + "foreignTable": "account", + "foreignKey": "account_id" } } } diff --git a/Admin/Installer.php b/Admin/Installer.php index 79e9c57..003289a 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -17,6 +17,7 @@ namespace Modules\Admin\Admin; use phpOMS\DataStorage\Database\Connection\SQLiteConnection; use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\DataStorage\Database\Query\Builder; + use phpOMS\Module\InfoManager; use phpOMS\Module\InstallerAbstract; @@ -43,47 +44,11 @@ final class Installer extends InstallerAbstract 'database' => __DIR__ . '/../../../phpOMS/Localization/Defaults/localization.sqlite' ]); - self::installCountries($sqlite, $dbPool); self::installLanguages($sqlite, $dbPool); $sqlite->close(); } - /** - * Install countries - * - * @param SQLiteConnection $sqlite SQLLite database connection of the source data - * @param DatabasePool $dbPool Database pool to save data to - * - * @return void - * - * @since 1.0.0 - */ - private static function installCountries(SQLiteConnection $sqlite, DatabasePool $dbPool) : void - { - $con = $dbPool->get(); - - $query = new Builder($con); - $query->prefix($con->getPrefix()) - ->insert('country_name', 'country_native', 'country_code2', 'country_code3', 'country_codenum') - ->into('country'); - - $querySqlite = new Builder($sqlite); - $countries = $querySqlite->select('*')->from('country')->execute(); - - foreach ($countries as $country) { - $query->values( - $country['country_name'], - $country['country_name'], - $country['country_code2'], - $country['country_code3'], - $country['country_numeric'] - ); - } - - $query->execute(); - } - /** * Install languages * diff --git a/Theme/Backend/Components/GroupTagSelector/group-selector-popup.tpl.php b/Theme/Backend/Components/GroupTagSelector/group-selector-popup.tpl.php index 960c413..07c6580 100644 --- a/Theme/Backend/Components/GroupTagSelector/group-selector-popup.tpl.php +++ b/Theme/Backend/Components/GroupTagSelector/group-selector-popup.tpl.php @@ -1,48 +1,47 @@ -