MediaWiki
master
LanguageConverterSpecific.php
Go to the documentation of this file.
1
<?php
21
use
MediaWiki\Title\Title
;
22
28
abstract
class
LanguageConverterSpecific
extends
LanguageConverter {
39
public
function
findVariantLink
( &$link, &$nt, $ignoreOtherCond =
false
) {
40
// check for user namespace
41
if
( is_object( $nt ) ) {
42
$ns = $nt->getNamespace();
43
if
( $ns ===
NS_USER
|| $ns ===
NS_USER_TALK
) {
44
return
;
45
}
46
}
47
48
$oldlink = $link;
49
parent::findVariantLink( $link, $nt, $ignoreOtherCond );
50
if
( $this->getPreferredVariant() == $this->getMainCode() ) {
51
$link = $oldlink;
52
}
53
}
54
}
NS_USER
const NS_USER
Definition
Defines.php:67
NS_USER_TALK
const NS_USER_TALK
Definition
Defines.php:68
LanguageConverterSpecific
A class that extends LanguageConverter with specific behaviour.
Definition
LanguageConverterSpecific.php:28
LanguageConverterSpecific\findVariantLink
findVariantLink(&$link, &$nt, $ignoreOtherCond=false)
A function wrapper:
Definition
LanguageConverterSpecific.php:39
MediaWiki\Title\Title
Represents a title within MediaWiki.
Definition
Title.php:78
includes
language
LanguageConverterSpecific.php
Generated on Fri Dec 6 2024 13:24:43 for MediaWiki by
1.10.0