specials: Get global via IContextSource::getConfig

Change-Id: I21a7164913514b919cb36959d6aa0e228a9e1e49
This commit is contained in:
Umherirrender 2024-09-17 21:54:33 +02:00
parent 6665aa44cc
commit 557cd3826d
2 changed files with 2 additions and 4 deletions

View file

@ -2,7 +2,6 @@
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule>
<file>.</file>

View file

@ -27,6 +27,7 @@ use MediaWiki\Extension\Gadgets\Gadget;
use MediaWiki\Extension\Gadgets\GadgetRepo;
use MediaWiki\Html\Html;
use MediaWiki\HTMLForm\HTMLForm;
use MediaWiki\MainConfigNames;
use MediaWiki\Message\Message;
use MediaWiki\Parser\Sanitizer;
use MediaWiki\SpecialPage\SpecialPage;
@ -417,8 +418,6 @@ class SpecialGadgets extends SpecialPage {
* @param string $gadget Name of gadget to export
*/
public function showExportForm( $gadget ) {
global $wgScript;
$this->addHelpLink( 'Extension:Gadgets' );
$output = $this->getOutput();
try {
@ -443,7 +442,7 @@ class SpecialGadgets extends SpecialPage {
->addHiddenField( 'pages', $exportList )
->addHiddenField( 'wpDownload', '1' )
->addHiddenField( 'templates', '1' )
->setAction( $wgScript )
->setAction( $this->getConfig()->get( MainConfigNames::Script ) )
->setMethod( 'get' )
->setSubmitText( $this->msg( 'gadgets-export-download' )->text() )
->prepareForm()