Page MenuHomePhabricator

Introduce shorthand to LanguageConverter for al SpecialPage hierarchy
Closed, ResolvedPublic

Description

  1. This function should provide simpler access to language converter for al SpecialPage hierarchy.
private function getLanguageConverter( \Language $language ) {
		return MediaWikiServices::getInstance()->getLanguageConverterFactory()
			->getLanguageConverter( $language );
	}

Replace code:

$converter = MediaWikiServices::getInstance()->getLanguageConverterFactory()
			->getLanguageConverter( MediaWikiServices::getInstance()->getContentLanguage() );

with

$converter = $this->getLanguageConverter( MediaWikiServices::getInstance()->getContentLanguage() );

List of files:

includes/specials/SpecialMIMESearch.php
includes/specials/SpecialMostLinkedCategories.php
includes/specials/SpecialUnwatchedPages.php
includes/specials/SpecialWantedCategories.php

Details

Related Gerrit Patches:

Event Timeline

Peter.ovchyn renamed this task from Introduce protected helper function getLanguageConverter( \Language $language ) on the top of hierarchy to Introduce protected function getLanguageConverter( \Language $language ) on the top of SpecialPage hierarchy.Jan 21 2020, 6:22 PM
Peter.ovchyn created this task.
Peter.ovchyn updated the task description. (Show Details)
Peter.ovchyn renamed this task from Introduce protected function getLanguageConverter( \Language $language ) on the top of SpecialPage hierarchy to Introduce simpler access to language converter for al SpecialPage hierarchy.Jan 21 2020, 6:25 PM
Peter.ovchyn updated the task description. (Show Details)
Peter.ovchyn updated the task description. (Show Details)
Peter.ovchyn renamed this task from Introduce simpler access to language converter for al SpecialPage hierarchy to Introduce shorthand to LanguageConverter for al SpecialPage hierarchy.Jan 21 2020, 8:04 PM
Peter.ovchyn updated the task description. (Show Details)

Sounds sensible

Change 570956 had a related patch set uploaded (by Peter.ovchyn; owner: Peter.ovchyn):
[mediawiki/core@master] special page: Introduce shorthand to LanguageConverter for al SpecialPage hierarchy

https://gerrit.wikimedia.org/r/570956

Change 570956 merged by jenkins-bot:
[mediawiki/core@master] Introduce shortcut to LanguageConverter for all SpecialPage hierarchy

https://gerrit.wikimedia.org/r/570956

Peter.ovchyn closed this task as Resolved.Mar 3 2020, 6:02 PM