From 8fb4e0b182063c78d55d83726d351a688f3970c9 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 5 Jun 2021 11:01:03 +0200 Subject: [PATCH] bug fixes --- Admin/Install/Application/config.tpl.php | 0 Admin/Install/CMS.install.json | 7 ++++ Admin/Install/CMS.php | 45 ++++++++++++++++++++++++ Admin/Install/db.json | 4 +-- Admin/Installer.php | 6 ++-- 5 files changed, 58 insertions(+), 4 deletions(-) delete mode 100644 Admin/Install/Application/config.tpl.php create mode 100644 Admin/Install/CMS.install.json create mode 100644 Admin/Install/CMS.php diff --git a/Admin/Install/Application/config.tpl.php b/Admin/Install/Application/config.tpl.php deleted file mode 100644 index e69de29..0000000 diff --git a/Admin/Install/CMS.install.json b/Admin/Install/CMS.install.json new file mode 100644 index 0000000..2b6c430 --- /dev/null +++ b/Admin/Install/CMS.install.json @@ -0,0 +1,7 @@ +[ + { + "src": "Modules/Shop/Install/Application/Shop", + "dest": "Web/Shop", + "name": "Shop" + } +] \ No newline at end of file diff --git a/Admin/Install/CMS.php b/Admin/Install/CMS.php new file mode 100644 index 0000000..3dfdacc --- /dev/null +++ b/Admin/Install/CMS.php @@ -0,0 +1,45 @@ + __DIR__ . '/CMS.install.json']); + } +} diff --git a/Admin/Install/db.json b/Admin/Install/db.json index 692d8b0..1f2bcb6 100644 --- a/Admin/Install/db.json +++ b/Admin/Install/db.json @@ -2,8 +2,8 @@ "shop_category": { "name": "shop_category", "fields": { - "shop_id": { - "name": "shop_id", + "shop_category_id": { + "name": "shop_category_id", "type": "INT", "null": false, "primary": true diff --git a/Admin/Installer.php b/Admin/Installer.php index dbe1815..15072ca 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -18,6 +18,7 @@ use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\InstallerAbstract; use phpOMS\Module\ModuleInfo; use phpOMS\System\File\Local\Directory; +use phpOMS\Config\SettingsInterface; /** * Installer class. @@ -32,14 +33,15 @@ final class Installer extends InstallerAbstract /** * {@inheritdoc} */ - public static function install(DatabasePool $dbPool, ModuleInfo $info) : void + public static function install(DatabasePool $dbPool, ModuleInfo $info, SettingsInterface $cfgHandler) : void { if (\file_exists(__DIR__ . '/../../../Web/Shop')) { Directory::delete(__DIR__ . '/../../../Web/Shop'); } + // @todo: replace with app installation (see TimeRecording...) Directory::copy(__DIR__ . '/Install/Shop', __DIR__ . '/../../../Web/Shop'); - parent::install($dbPool, $info); + parent::install($dbPool, $info, $cfgHandler); } }