X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FApp.php;h=f59194077ca1cbd48f943ee5044288402ba36808;hb=b9ab6137776f39db3d01481cb6a7d5f6a1634be5;hp=0f0c0537e4d98ae5538fda12993c2734c49e6d4f;hpb=9fb111bca2cc7ab0817d4ddcb294faa9c144c650;p=friendica.git diff --git a/src/App.php b/src/App.php index 0f0c0537e4..f59194077c 100644 --- a/src/App.php +++ b/src/App.php @@ -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'); } /** @@ -992,12 +993,6 @@ class App ); } - if (strstr($this->query_string, '.well-known/host-meta') && ($this->query_string != '.well-known/host-meta')) { - Module\Special\HTTPException::rawContent( - new HTTPException\NotFoundException() - ); - } - if (!$this->getMode()->isInstall()) { // Force SSL redirection if ($this->baseURL->checkRedirectHttps()) { @@ -1037,10 +1032,11 @@ class App // Valid profile links contain a path with "/profile/" and no query parameters if ((parse_url($_GET['zrl'], PHP_URL_QUERY) == "") && strstr(parse_url($_GET['zrl'], PHP_URL_PATH), "/profile/")) { - if (defaults($_SESSION, "visitor_home", "") != $_GET["zrl"]) { - $_SESSION['my_url'] = $_GET['zrl']; - $_SESSION['authenticated'] = 0; + if (Core\Session::get('visitor_home') != $_GET["zrl"]) { + Core\Session::set('my_url', $_GET['zrl']); + Core\Session::set('authenticated', 0); } + Model\Profile::zrlInit($this); } else { // Someone came with an invalid parameter, maybe as a DDoS attempt @@ -1065,9 +1061,9 @@ class App header('X-Account-Management-Status: none'); } - $_SESSION['sysmsg'] = defaults($_SESSION, 'sysmsg' , []); - $_SESSION['sysmsg_info'] = defaults($_SESSION, 'sysmsg_info' , []); - $_SESSION['last_updated'] = defaults($_SESSION, 'last_updated', []); + $_SESSION['sysmsg'] = Core\Session::get('sysmsg', []); + $_SESSION['sysmsg_info'] = Core\Session::get('sysmsg_info', []); + $_SESSION['last_updated'] = Core\Session::get('last_updated', []); /* * check_config() is responsible for running update scripts. These automatically @@ -1079,7 +1075,7 @@ class App // but we need "view" module for stylesheet if ($this->getMode()->isInstall() && $this->module !== 'install') { $this->internalRedirect('install'); - } elseif (!$this->getMode()->has(App\Mode::MAINTENANCEDISABLED) && $this->module !== 'maintenance') { + } elseif (!$this->getMode()->isInstall() && !$this->getMode()->has(App\Mode::MAINTENANCEDISABLED) && $this->module !== 'maintenance') { $this->internalRedirect('maintenance'); } else { $this->checkURL(); @@ -1103,7 +1099,7 @@ class App // Compatibility with the Android Diaspora client if ($this->module == 'stream') { - $this->internalRedirect('network?f=&order=post'); + $this->internalRedirect('network?order=post'); } if ($this->module == 'conversations') { @@ -1111,15 +1107,15 @@ class App } if ($this->module == 'commented') { - $this->internalRedirect('network?f=&order=comment'); + $this->internalRedirect('network?order=comment'); } if ($this->module == 'liked') { - $this->internalRedirect('network?f=&order=comment'); + $this->internalRedirect('network?order=comment'); } if ($this->module == 'activity') { - $this->internalRedirect('network/?f=&conv=1'); + $this->internalRedirect('network?conv=1'); } if (($this->module == 'status_messages') && ($this->cmd == 'status_messages/new')) {