mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 03:08:42 +00:00
Replace all usages of Linker::link() with LinkRenderer
Linker::link was deprected in 1.28. This replaces all usages of Linker::link with an instance of LinkRenderer in ApiVisualEditor.php, as this seems to be the only file generating links with Linker::link. Bug: T149346 Change-Id: Ib395f137787e7dd7c5cfe91905f5feb88ce9f604
This commit is contained in:
parent
2217913182
commit
0533c329fb
|
@ -8,6 +8,8 @@
|
|||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
|
||||
class ApiVisualEditor extends ApiBase {
|
||||
/**
|
||||
* @var Config
|
||||
|
@ -350,7 +352,9 @@ class ApiVisualEditor extends ApiBase {
|
|||
// Unfortunately there's no nice way to get only the pages which cause
|
||||
// editing to be restricted
|
||||
foreach ( $sources as $source ) {
|
||||
$notice .= "<li>" . Linker::link( $source ) . "</li>";
|
||||
$notice .= "<li>" .
|
||||
MediaWikiServices::getInstance()->getLinkRenderer()->makeLink( $source ) .
|
||||
"</li>";
|
||||
}
|
||||
$notice .= '</ul>';
|
||||
$notices[] = $notice;
|
||||
|
@ -568,9 +572,9 @@ class ApiVisualEditor extends ApiBase {
|
|||
);
|
||||
$lp->mLimit = 1;
|
||||
|
||||
return $lp->getBody() . Linker::link(
|
||||
return $lp->getBody() . MediaWikiServices::getInstance()->getLinkRenderer()->makeLink(
|
||||
SpecialPage::getTitleFor( 'Log' ),
|
||||
$this->msg( 'log-fulllog' )->escaped(),
|
||||
$this->msg( 'log-fulllog' )->text(),
|
||||
[],
|
||||
[
|
||||
'page' => $title->getPrefixedDBkey(),
|
||||
|
|
Loading…
Reference in a new issue