*/
function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) {
global $wgContLang;
- $titletext = $wgContLang->convertHtml( $title->getPrefixedText(), true );
+ $titletext = $wgContLang->convertHtml( $title->getPrefixedText() );
$this->articles[] = $isRedirect
? '<span class="redirect-in-category">' . $this->getSkin()->makeKnownLinkObj( $title, $titletext ) . '</span>'
: $this->getSkin()->makeSizeLinkObj( $pageLength, $title, $titletext );
}
wfProfileOut( $fname );
- // Use $wgContLang to get a converted string by language.
- global $wgContLang;
- return $wgContLang->convert( $notice );
+ return $notice;
}
function wfGetNamespaceNotice() {
class FakeConverter {
var $mLang;
function FakeConverter($langobj) {$this->mLang = $langobj;}
- function convert($t, $i, $v) {return $t;}
+ function convert($t, $i) {return $t;}
function parserConvert($t, $p) {return $t;}
function getVariants() { return array( $this->mLang->getCode() ); }
function getPreferredVariant() {return $this->mLang->getCode(); }
}
# convert text to different variants of a language.
- function convert( $text, $isTitle = false, $variant = null ) {
- return $this->mConverter->convert($text, $isTitle, $variant);
+ function convert( $text, $isTitle = false) {
+ return $this->mConverter->convert($text, $isTitle);
}
# Convert text from within Parser
*
* @param string $text text to be converted
* @param bool $isTitle whether this conversion is for the article title
- * @param string $variant the variant we convert to
* @return string converted text
* @public
*/
- function convert( $text, $isTitle = false, $variant = null ) {
+ function convert( $text, $isTitle = false ) {
$mw =& MagicWord::get( 'notitleconvert' );
if( $mw->matchAndRemove( $text ) )
if( $mw->matchStart( $text ) )
return $text;
- if( $variant && in_array( $variant, $this->mVariants ) )
- $plang = $variant;
- else
- $plang = $this->getPreferredVariant();
+ $plang = $this->getPreferredVariant();
// for title convertion
if ( $isTitle ) return $this->convertTitle( $text, $plang );