]> git.mxchange.org Git - friendica.git/blobdiff - src/App.php
Add search types
[friendica.git] / src / App.php
index 017661c4ca666081ad997b5e5d97ad7ce3ed4d08..2e357f8651a6e738aa31ab106429fcfcef6d96c6 100644 (file)
@@ -149,7 +149,8 @@ class App
         */
        public function getBasePath()
        {
-               return $this->config->get('system', 'basepath');
+               // Don't use the basepath of the config table for basepath (it should always be the config-file one)
+               return $this->config->getCache()->get('system', 'basepath');
        }
 
        /**
@@ -988,7 +989,7 @@ class App
                        header('Refresh: 120; url=' . $this->getBaseURL() . "/" . $this->query_string);
 
                        Module\Special\HTTPException::rawContent(
-                               new HTTPException\ServiceUnavaiableException('The node is currently overloaded. Please try again later.')
+                               new HTTPException\ServiceUnavailableException('The node is currently overloaded. Please try again later.')
                        );
                }
 
@@ -1077,10 +1078,10 @@ class App
 
                // in install mode, any url loads install module
                // but we need "view" module for stylesheet
-               if ($this->getMode()->isInstall() && $this->module != 'view') {
-                       $this->module = 'install';
-               } elseif (!$this->getMode()->has(App\Mode::MAINTENANCEDISABLED) && $this->module != 'view') {
-                       $this->module = 'maintenance';
+               if ($this->getMode()->isInstall() && $this->module !== 'install') {
+                       $this->internalRedirect('install');
+               } elseif (!$this->getMode()->isInstall() && !$this->getMode()->has(App\Mode::MAINTENANCEDISABLED) && $this->module !== 'maintenance') {
+                       $this->internalRedirect('maintenance');
                } else {
                        $this->checkURL();
                        Core\Update::check($this->getBasePath(), false, $this->getMode());