mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-23 23:13:27 +00:00
Use RequestContext::getActionName instead of the uncached ActionFactory::getActionName
Also avoids injecting the ActionFactory service. Change-Id: I9a26aff0d3885470d6cd376ab870023bb377ac77
This commit is contained in:
parent
699270148c
commit
cb6f69103c
|
@ -8,7 +8,7 @@
|
|||
"descriptionmsg": "gadgets-desc",
|
||||
"license-name": "GPL-2.0-or-later",
|
||||
"requires": {
|
||||
"MediaWiki": ">= 1.37.0"
|
||||
"MediaWiki": ">= 1.38.0"
|
||||
},
|
||||
"type": "other",
|
||||
"namespaces": [
|
||||
|
|
|
@ -22,7 +22,6 @@ namespace MediaWiki\Extension\Gadgets;
|
|||
* @file
|
||||
*/
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use OutputPage;
|
||||
use Skin;
|
||||
use User;
|
||||
|
@ -46,7 +45,7 @@ class GadgetLoadConditions {
|
|||
$this->user = $out->getUser();
|
||||
$this->target = $out->getTarget() ?? 'desktop';
|
||||
$this->skin = $out->getSkin();
|
||||
$this->action = MediaWikiServices::getInstance()->getActionFactory()->getActionName( $out->getContext() );
|
||||
$this->action = $out->getContext()->getActionName();
|
||||
$this->withGadgetParam = $out->getRequest()->getRawVal( 'withgadget' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue