diff --git a/components/com_finder/views/search/view.html.php b/components/com_finder/views/search/view.html.php index 10631a78e3096..187e5b868851d 100644 --- a/components/com_finder/views/search/view.html.php +++ b/components/com_finder/views/search/view.html.php @@ -76,7 +76,7 @@ public function display($tpl = null) if (strpos($this->query->input, '"')) { // Get the application router. - $router =& $app->getRouter(); + $router =& $app::getRouter(); // Fix the q variable in the URL. if ($router->getVar('q') !== $this->query->input) diff --git a/libraries/cms/application/cms.php b/libraries/cms/application/cms.php index ee06eb6fc3d4b..c06caf434b545 100644 --- a/libraries/cms/application/cms.php +++ b/libraries/cms/application/cms.php @@ -1018,7 +1018,7 @@ protected function route() // Get the full request URI. $uri = clone JUri::getInstance(); - $router = $this->getRouter(); + $router = static::getRouter(); $result = $router->parse($uri); foreach ($result as $key => $value) diff --git a/libraries/joomla/application/route.php b/libraries/joomla/application/route.php index e597ae66b0919..42765afbf5663 100644 --- a/libraries/joomla/application/route.php +++ b/libraries/joomla/application/route.php @@ -44,7 +44,8 @@ public static function _($url, $xhtml = true, $ssl = null) if (!self::$_router) { // Get the router. - self::$_router = JFactory::getApplication()->getRouter(); + $app = JFactory::getApplication(); + self::$_router = $app::getRouter(); // Make sure that we have our router if (!self::$_router) diff --git a/modules/mod_login/helper.php b/modules/mod_login/helper.php index d3c88ec254743..af1366090a733 100644 --- a/modules/mod_login/helper.php +++ b/modules/mod_login/helper.php @@ -30,7 +30,7 @@ class ModLoginHelper public static function getReturnURL($params, $type) { $app = JFactory::getApplication(); - $router = $app->getRouter(); + $router = $app::getRouter(); $url = null; if ($itemid = $params->get($type)) diff --git a/plugins/system/languagefilter/languagefilter.php b/plugins/system/languagefilter/languagefilter.php index 4ffd0b3b74a8e..4cca7d0cd4145 100644 --- a/plugins/system/languagefilter/languagefilter.php +++ b/plugins/system/languagefilter/languagefilter.php @@ -58,7 +58,7 @@ public function __construct(&$subject, $config) if (!self::$default_lang) { $app = JFactory::getApplication(); - $router = $app->getRouter(); + $router = $app::getRouter(); if ($app->isSite()) { @@ -152,7 +152,7 @@ public function onAfterInitialise() { self::$tag = JFactory::getLanguage()->getTag(); - $router = $app->getRouter(); + $router = $app::getRouter(); // Attach build rules for language SEF. $router->attachBuildRule(array($this, 'buildRule')); diff --git a/plugins/system/sef/sef.php b/plugins/system/sef/sef.php index 580150049782a..cf73cb42ea918 100644 --- a/plugins/system/sef/sef.php +++ b/plugins/system/sef/sef.php @@ -34,7 +34,7 @@ public function onAfterRoute() return true; } - $router = $app->getRouter(); + $router = $app::getRouter(); $uri = clone JUri::getInstance(); $domain = $this->params->get('domain');