mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-23 15:06:48 +00:00
specials: Get global via IContextSource::getConfig
Change-Id: I21a7164913514b919cb36959d6aa0e228a9e1e49
This commit is contained in:
parent
6665aa44cc
commit
557cd3826d
|
@ -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>
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue