diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index af01425dd..b0c884304 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -139,8 +139,6 @@ class Page } $this->published(); $this->extension(); - -// $this->setupLanguage(); } /** @@ -1214,7 +1212,7 @@ class Page */ public function routeAliases($var = null) { - if ($var != null) { + if ($var !== null) { $this->routes['aliases'] = (array) $var; } @@ -1235,7 +1233,7 @@ class Page */ public function routeCanonical($var = null) { - if ($var != null) { + if ($var !== null) { $this->routes['canonical'] = (array)$var; } @@ -1623,7 +1621,6 @@ class Page { /** @var Uri $uri */ $uri = self::getGrav()['uri']; - $config = self::getGrav()['config']; // Special check when item is home if ($this->home()) { @@ -1839,19 +1836,6 @@ class Page return $results; } - public function setupLanguage() - { - /** @var Language $language */ - $language = self::getGrav()['language']; - - // add the language pre route back to the route - if ($language->enabled() && $language->getActive()) { - $this->route = '/' . $language->getActive() . $this->route; - } - - } - - /** * Returns whether or not this Page object has a .md file associated with it or if its just a directory. * diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index 9a705c8fd..3ef29dac6 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -723,11 +723,7 @@ class Pages } } - /** @var Config $config */ - $config = $this->grav['config']; - // Alias and set default route to home page. - if ($home && isset($this->routes['/' . $home])) { $this->routes['/'] = $this->routes['/' . $home]; $this->get($this->routes['/' . $home])->route('/'); diff --git a/system/src/Grav/Common/Uri.php b/system/src/Grav/Common/Uri.php index 65d4df667..c070dfcf2 100644 --- a/system/src/Grav/Common/Uri.php +++ b/system/src/Grav/Common/Uri.php @@ -1,6 +1,7 @@ findResource($package->package_type . '://' .$slug); Installer::uninstall($path); $errorCode = Installer::lastErrorCode();