mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-15 11:31:40 +00:00
Merge "Replace Linker::link() with LinkRenderer"
This commit is contained in:
commit
fecdbf695e
|
@ -12,5 +12,5 @@ if ( function_exists( 'wfLoadExtension' ) ) {
|
|||
); */
|
||||
return true;
|
||||
} else {
|
||||
die( 'This version of the Gadgets extension requires MediaWiki 1.25+' );
|
||||
die( 'This version of the Gadgets extension requires MediaWiki 1.28+' );
|
||||
}
|
||||
|
|
|
@ -61,11 +61,13 @@ class SpecialGadgets extends SpecialPage {
|
|||
? 'edit'
|
||||
: 'viewsource';
|
||||
|
||||
$linkRenderer = $this->getLinkRenderer();
|
||||
foreach ( $gadgets as $section => $entries ) {
|
||||
if ( $section !== false && $section !== '' ) {
|
||||
$t = Title::makeTitleSafe( NS_MEDIAWIKI, "Gadget-section-$section$langSuffix" );
|
||||
$lnkTarget = $t
|
||||
? Linker::link( $t, $this->msg( $editInterfaceMessage )->escaped(), [], [ 'action' => 'edit' ] )
|
||||
? $linkRenderer->makeLink( $t, $this->msg( $editInterfaceMessage )->text(),
|
||||
[], [ 'action' => 'edit' ] )
|
||||
: htmlspecialchars( $section );
|
||||
$lnk = "    [$lnkTarget]";
|
||||
|
||||
|
@ -90,15 +92,15 @@ class SpecialGadgets extends SpecialPage {
|
|||
}
|
||||
|
||||
$links = [];
|
||||
$links[] = Linker::link(
|
||||
$links[] = $linkRenderer->makeLink(
|
||||
$t,
|
||||
$this->msg( $editInterfaceMessage )->escaped(),
|
||||
$this->msg( $editInterfaceMessage )->text(),
|
||||
[],
|
||||
[ 'action' => 'edit' ]
|
||||
);
|
||||
$links[] = Linker::link(
|
||||
$links[] = $linkRenderer->makeLink(
|
||||
$this->getPageTitle( "export/{$name}" ),
|
||||
$this->msg( 'gadgets-export' )->escaped()
|
||||
$this->msg( 'gadgets-export' )->text()
|
||||
);
|
||||
|
||||
$ttext = $this->msg( "gadget-{$name}" )->parse();
|
||||
|
@ -132,7 +134,7 @@ class SpecialGadgets extends SpecialPage {
|
|||
continue;
|
||||
}
|
||||
|
||||
$lnk[] = Linker::link( $t, htmlspecialchars( $t->getText() ) );
|
||||
$lnk[] = $linkRenderer->makeLink( $t, $t->getText() );
|
||||
}
|
||||
$output->addHTML( $lang->commaList( $lnk ) );
|
||||
if ( $gadget->getLegacyScripts() ) {
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
"url": "https://www.mediawiki.org/wiki/Extension:Gadgets",
|
||||
"descriptionmsg": "gadgets-desc",
|
||||
"license-name": "GPL-2.0+",
|
||||
"requires": {
|
||||
"MediaWiki": ">= 1.28.0"
|
||||
},
|
||||
"type": "other",
|
||||
"namespaces": [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue