mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/InputBox
synced 2024-12-18 01:30:38 +00:00
Avoid usage of deprecated $wgContLang global (dep in 1.32)
Change-Id: I1c3d9b6d9de3c7ef24f24f45aad9510be3f8b588
This commit is contained in:
parent
a2611d784f
commit
aab9a97c96
|
@ -6,6 +6,8 @@
|
|||
* @ingroup Extensions
|
||||
*/
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
|
||||
/**
|
||||
* InputBox class
|
||||
*/
|
||||
|
@ -128,7 +130,7 @@ class InputBox {
|
|||
* @return string HTML
|
||||
*/
|
||||
public function getSearchForm( $type ) {
|
||||
global $wgContLang, $wgNamespaceAliases;
|
||||
global $wgNamespaceAliases;
|
||||
|
||||
// Use button label fallbacks
|
||||
if ( !$this->mButtonLabel ) {
|
||||
|
@ -189,8 +191,9 @@ class InputBox {
|
|||
// Determine namespace checkboxes
|
||||
$namespacesArray = explode( ',', $this->mNamespaces );
|
||||
if ( $this->mNamespaces ) {
|
||||
$namespaces = $wgContLang->getNamespaces();
|
||||
$nsAliases = array_merge( $wgContLang->getNamespaceAliases(), $wgNamespaceAliases );
|
||||
$contLang = MediaWikiServices::getInstance()->getContentLanguage();
|
||||
$namespaces = $contLang->getNamespaces();
|
||||
$nsAliases = array_merge( $contLang->getNamespaceAliases(), $wgNamespaceAliases );
|
||||
$showNamespaces = [];
|
||||
$checkedNS = [];
|
||||
// Check for valid namespaces
|
||||
|
|
Loading…
Reference in a new issue