]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Install.php
Merge pull request #6767 from MrPetovan/bug/fatal-errors
[friendica.git] / src / Module / Install.php
index 3414e887fa93438b89253a565751ad178a0273de..de19bc86ab81da9e1248cb21f0b292dcdcf7e878 100644 (file)
@@ -43,6 +43,10 @@ class Install extends BaseModule
        {
                $a = self::getApp();
 
+               if (!$a->getMode()->isInstall()) {
+                       Core\System::httpExit(403);
+               }
+
                // route: install/testrwrite
                // $baseurl/install/testrwrite to test if rewrite in .htaccess is working
                if ($a->getArgumentValue(1, '') == 'testrewrite') {
@@ -75,7 +79,7 @@ class Install extends BaseModule
                                $dbdata  = Strings::escapeTags(trim(defaults($_POST, 'dbdata', '')));
 
                                // If we cannot connect to the database, return to the previous step
-                               if (!self::$installer->checkDB($a->getConfigCache(), $a->getProfiler(), $dbhost, $dbuser, $dbpass, $dbdata)) {
+                               if (!self::$installer->checkDB($a->getBasePath(), $a->getConfigCache(), $a->getProfiler(), $dbhost, $dbuser, $dbpass, $dbdata)) {
                                        self::$currentWizardStep = self::DATABASE_CONFIG;
                                }
 
@@ -92,7 +96,7 @@ class Install extends BaseModule
                                $adminmail = Strings::escapeTags(trim(defaults($_POST, 'adminmail', '')));
 
                                // If we cannot connect to the database, return to the Database config wizard
-                               if (!self::$installer->checkDB($a->getConfigCache(), $a->getProfiler(), $dbhost, $dbuser, $dbpass, $dbdata)) {
+                               if (!self::$installer->checkDB($a->getBasePath(), $a->getConfigCache(), $a->getProfiler(), $dbhost, $dbuser, $dbpass, $dbdata)) {
                                        self::$currentWizardStep = self::DATABASE_CONFIG;
                                        return;
                                }