Skip to content

Commit 75ba439

Browse files
wilsongeBakual
authored andcommitted
[bug] [33688] JApplicationCms::getRouter is a static method.
Closes joomla#3548
1 parent 0b5c29d commit 75ba439

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

components/com_finder/views/search/view.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function display($tpl = null)
7676
if (strpos($this->query->input, '"'))
7777
{
7878
// Get the application router.
79-
$router =& $app->getRouter();
79+
$router =& $app::getRouter();
8080

8181
// Fix the q variable in the URL.
8282
if ($router->getVar('q') !== $this->query->input)

libraries/cms/application/cms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ protected function route()
10181018
// Get the full request URI.
10191019
$uri = clone JUri::getInstance();
10201020

1021-
$router = $this->getRouter();
1021+
$router = static::getRouter();
10221022
$result = $router->parse($uri);
10231023

10241024
foreach ($result as $key => $value)

libraries/joomla/application/route.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public static function _($url, $xhtml = true, $ssl = null)
4444
if (!self::$_router)
4545
{
4646
// Get the router.
47-
self::$_router = JFactory::getApplication()->getRouter();
47+
$app = JFactory::getApplication();
48+
self::$_router = $app::getRouter();
4849

4950
// Make sure that we have our router
5051
if (!self::$_router)

modules/mod_login/helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ModLoginHelper
3030
public static function getReturnURL($params, $type)
3131
{
3232
$app = JFactory::getApplication();
33-
$router = $app->getRouter();
33+
$router = $app::getRouter();
3434
$url = null;
3535

3636
if ($itemid = $params->get($type))

plugins/system/languagefilter/languagefilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(&$subject, $config)
5858
if (!self::$default_lang)
5959
{
6060
$app = JFactory::getApplication();
61-
$router = $app->getRouter();
61+
$router = $app::getRouter();
6262

6363
if ($app->isSite())
6464
{
@@ -152,7 +152,7 @@ public function onAfterInitialise()
152152
{
153153
self::$tag = JFactory::getLanguage()->getTag();
154154

155-
$router = $app->getRouter();
155+
$router = $app::getRouter();
156156

157157
// Attach build rules for language SEF.
158158
$router->attachBuildRule(array($this, 'buildRule'));

plugins/system/sef/sef.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function onAfterRoute()
3434
return true;
3535
}
3636

37-
$router = $app->getRouter();
37+
$router = $app::getRouter();
3838

3939
$uri = clone JUri::getInstance();
4040
$domain = $this->params->get('domain');

0 commit comments

Comments
 (0)