MediaWiki REL1_35
LanguageConverterSpecific.php
Go to the documentation of this file.
1<?php
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->mMainLanguageCode ) {
49 $link = $oldlink;
50 }
51 }
52}
A class that extends LanguageConverter with specific behaviour.
findVariantLink(&$link, &$nt, $ignoreOtherCond=false)
A function wrapper:
Base class for multi-variant language conversion.
getPreferredVariant()
Get preferred language variant.
const NS_USER
Definition Defines.php:72
const NS_USER_TALK
Definition Defines.php:73