MediaWiki
REL1_39
LanguageConverterSpecific.php
Go to the documentation of this file.
1
<?php
26
abstract
class
LanguageConverterSpecific
extends
LanguageConverter
{
37
public
function
findVariantLink
( &$link, &$nt, $ignoreOtherCond =
false
) {
38
// check for user namespace
39
if
( is_object( $nt ) ) {
40
$ns = $nt->getNamespace();
41
if
( $ns ===
NS_USER
|| $ns ===
NS_USER_TALK
) {
42
return
;
43
}
44
}
45
46
$oldlink = $link;
47
parent::findVariantLink( $link, $nt, $ignoreOtherCond );
48
if
( $this->
getPreferredVariant
() == $this->
getMainCode
() ) {
49
$link = $oldlink;
50
}
51
}
52
}
NS_USER
const NS_USER
Definition
Defines.php:66
NS_USER_TALK
const NS_USER_TALK
Definition
Defines.php:67
LanguageConverterSpecific
A class that extends LanguageConverter with specific behaviour.
Definition
LanguageConverterSpecific.php:26
LanguageConverterSpecific\findVariantLink
findVariantLink(&$link, &$nt, $ignoreOtherCond=false)
A function wrapper:
Definition
LanguageConverterSpecific.php:37
LanguageConverter
Base class for multi-variant language conversion.
Definition
LanguageConverter.php:38
LanguageConverter\getPreferredVariant
getPreferredVariant()
Get preferred language variant.
Definition
LanguageConverter.php:290
LanguageConverter\getMainCode
getMainCode()
Get main language code.
includes
language
LanguageConverterSpecific.php
Generated on Sun Nov 24 2024 20:23:21 for MediaWiki by
1.10.0