]> git.mxchange.org Git - friendica.git/blobdiff - src/App.php
Little fixes (#5414)
[friendica.git] / src / App.php
index 6304ca995abd7f923e1c66eb8e73b038f3cc769d..e1843e5737dc99f318bf3f590d8e658a13c9c917 100644 (file)
@@ -154,25 +154,6 @@ class App
 
                $this->basepath = rtrim($basepath, DIRECTORY_SEPARATOR);
 
-               // The order of the following calls is important to ensure proper initialization
-               $this->loadConfigFiles();
-
-               $this->loadDatabase();
-
-               $this->determineMode();
-
-               $this->determineUrlPath();
-
-               Config::load();
-
-               if ($this->mode & self::MODE_DBAVAILABLE) {
-                       Core\Addon::loadHooks();
-
-                       $this->loadAddonConfig();
-               }
-
-               $this->loadDefaultTimezone();
-
                $this->performance['start'] = microtime(true);
                $this->performance['database'] = 0;
                $this->performance['database_write'] = 0;
@@ -194,6 +175,25 @@ class App
                $this->callstack['rendering'] = [];
                $this->callstack['parser'] = [];
 
+               // The order of the following calls is important to ensure proper initialization
+               $this->loadConfigFiles();
+
+               $this->loadDatabase();
+
+               $this->determineMode();
+
+               $this->determineUrlPath();
+
+               Config::load();
+
+               if ($this->mode & self::MODE_DBAVAILABLE) {
+                       Core\Addon::loadHooks();
+
+                       $this->loadAddonConfig();
+               }
+
+               $this->loadDefaultTimezone();
+
                $this->page = [
                        'aside' => '',
                        'bottom' => '',
@@ -357,6 +357,11 @@ class App
                                $this->setConfigValue('system', 'pidfile', $pidfile);
                                unset($pidfile);
                        }
+
+                       if (isset($lang)) {
+                               $this->setConfigValue('system', 'language', $lang);
+                               unset($lang);
+                       }
                }
 
                if (file_exists($this->basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php')) {