diff --git a/config/_config.php b/config/_config.php
index 1a356b9e..1d650cbe 100644
--- a/config/_config.php
+++ b/config/_config.php
@@ -1,4 +1,5 @@
'root',
'password' => '$2y$12$h7klHtKaX4jDSHIf0KEvNeSNCCrlZFz6Fy5Y7e0wcfYu3I9W0JCIW',
'accessToken' => '',
+ /**
+ * Modules for the MMLC are downloaded in this folder.
+ *
+ * Default: 'Modules'
+ */
'modulesLocalDir' => 'Modules',
+
+
+ /**
+ * The URL to the MMLS API that the MMLC can use to obtain modules and updates.
+ *
+ * Default: 'https://app.module-loader.de/api.php'
+ */
'remoteAddress' => 'https://app.module-loader.de/api.php',
/**
- * Settings revolving around MMLC itself.
+ * You can choose between copy and link. If you are using the MMLC in a live shop, select copy. If you are
+ * developing with the MMLC Module, choose link.
*
- * @param string installMode copy
- * @param string selfUpdate stable, latest
+ * Values: copy, link
+ * Default: 'copy'
*/
'installMode' => 'copy',
+
+ /**
+ * You can choose between strict and lax. With strict the dependencies of modules with a version lower than 1.0.0
+ * are controlled more precisely. If some modules fail to install, you can try lax. Note that in Lex mode there is
+ * a greater chance that different modules will not work well together.
+ *
+ * Values: lax, strict
+ * Default: lax
+ */
+ 'dependencyMode' => 'lax',
+
+
+ /**
+ * Should be updated to the next stable version of the MMLC or to the latest (alpha, beta, ...)
+ *
+ * Values: stable, latest
+ * Default: 'stable'
+ */
'selfUpdate' => 'stable',
+ /**
+ * The MMLC can automatically find your admin directory even if it has been renamed. If that doesn't work, you can
+ * enter the name of the admin directory here. Leave the field blank if you want the MMLC to automatically try to
+ * find the admin directory.
+ *
+ * Default: ''
+ */
+ 'adminDir' => '',
+
/**
* Settings revolving around your modified-shop
*
@@ -33,7 +76,25 @@
* of your modified-shop root and exists as a symbolic link, you may need to
* define your shop root here.
*
- * Leave empty for default.
+ * Default: ''
*/
'shopRoot' => '',
+
+ /**
+ * Should (error) messages be logged in the ModifiedModuleLoaderClient/logs/ directory?
+ *
+ * Values: true, false
+ * Default: ture
+ */
+ 'logging' => 'true',
+
+
+ /**
+ * If the MMLC should display programming errors in the browser, you can enter the domain to which this applies.
+ * The exception monitor becomes active in the event of errors as soon as the domain stored is the same as that
+ * from which the MMLC is called. Example www.example.org
+ *
+ * Default: ''
+ */
+ 'exceptionMonitorDomain' => '',
];
diff --git a/src/Classes/Config.php b/src/Classes/Config.php
index effb1575..27c2912a 100644
--- a/src/Classes/Config.php
+++ b/src/Classes/Config.php
@@ -413,6 +413,16 @@ public static function setExceptionMonitorMail(string $newExceptionMonitorMail):
self::writeConfiguration(['exceptionMonitorMail' => $newExceptionMonitorMail]);
}
+ /**
+ * Set logging in config.
+ *
+ * @param string $logging.
+ */
+ public static function setLogging(string $logging): void
+ {
+ self::writeConfiguration(['logging' => $logging]);
+ }
+
/**
* Get logging from config.
*
diff --git a/src/Classes/IndexController.php b/src/Classes/IndexController.php
index 24fd2d72..f78622e0 100644
--- a/src/Classes/IndexController.php
+++ b/src/Classes/IndexController.php
@@ -612,6 +612,10 @@ public function invokeSettings()
if ($this->isPostRequest()) {
$parsedBody = $this->serverRequest->getParsedBody();
+ if (isset($parsedBody['adminDir'])) {
+ Config::setAdminDir($parsedBody['adminDir']);
+ }
+
if (isset($parsedBody['username'])) {
Config::setUsername($parsedBody['username']);
}
@@ -636,6 +640,10 @@ public function invokeSettings()
Config::setModulesLocalDir($parsedBody['modulesLocalDir']);
}
+ if (isset($parsedBody['logging'])) {
+ Config::setLogging($parsedBody['logging']);
+ }
+
if (isset($parsedBody['installMode'])) {
Config::setInstallMode($parsedBody['installMode']);
}
@@ -644,6 +652,10 @@ public function invokeSettings()
Config::setDependencyMode($parsedBody['dependencyMode']);
}
+ if (isset($parsedBody['exceptionMonitorDomain'])) {
+ Config::setExceptionMonitorDomain($parsedBody['exceptionMonitorDomain']);
+ }
+
Notification::pushFlashMessage([
'text' => 'Einstellungen erfolgreich gespeichert.',
'type' => 'success'
diff --git a/src/Templates/Settings.tmpl.php b/src/Templates/Settings.tmpl.php
index 283af1bd..92b86a28 100644
--- a/src/Templates/Settings.tmpl.php
+++ b/src/Templates/Settings.tmpl.php
@@ -53,6 +53,8 @@ function viewIsSelected(bool $value): string