Skip to content

Commit

Permalink
[bug] [33688] JApplicationCms::getRouter is a static method.
Browse files Browse the repository at this point in the history
Closes #3548
  • Loading branch information
wilsonge authored and Bakual committed May 5, 2014
1 parent c69c31c commit e07b96f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/com_finder/views/search/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/application/cms.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion libraries/joomla/application/route.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_login/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions plugins/system/languagefilter/languagefilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down Expand Up @@ -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'));
Expand Down
2 changes: 1 addition & 1 deletion plugins/system/sef/sef.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function onAfterRoute()
return true;
}

$router = $app->getRouter();
$router = $app::getRouter();

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

0 comments on commit e07b96f

Please sign in to comment.