Skip to content

Commit

Permalink
Fixed error after update to Joomla 3.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mokhin-denis committed Sep 1, 2016
1 parent e9c2bf0 commit 0b084d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions askmyadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function plgAskMyAdmin( &$subject, $config = array() )
{
parent :: __construct($subject, $config);

$plugin =& JPluginHelper::getPlugin( 'system', 'askmyadmin');
$plugin = JPluginHelper::getPlugin( 'system', 'askmyadmin');
$this->params = new JParameter( $plugin->params );
}

Expand Down Expand Up @@ -72,10 +72,13 @@ function onAfterInitialise()
}

if( JRequest::getMethod() == 'POST' )
{
$ref = $_SERVER['HTTP_REFERER'];
$u =& JURI::getInstance( $ref );
$request = $u->getVar( $keyname, 'no token set' );
{
if( isset($_SERVER['HTTP_REFERER']) )
{
$ref = $_SERVER['HTTP_REFERER'];
$u = JURI::getInstance( $ref );
$request = $u->getVar( $keyname, 'no token set' );
}
}

//invalid access token
Expand All @@ -93,6 +96,4 @@ function onAfterInitialise()
die;
}
}
}

?>
}
2 changes: 1 addition & 1 deletion askmyadmin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<copyright>Copyright (C) 2013-2016 Denis Mokhin - All rights reserved.</copyright>
<license>GNU GPL, see http://www.gnu.org/licenses/gpl-2.0.html</license>
<authorEmail>denis@mokhin-tech.ru</authorEmail>
<version>1.3</version>
<version>1.4</version>
<description>PLG_SYSTEM_ASKMYADMIN_DESC</description>
<client>administrator</client>
<files>
Expand Down

0 comments on commit 0b084d8

Please sign in to comment.