r70430 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70429‎ | r70430 | r70431 >
Date:21:43, 3 August 2010
Author:simetrical
Status:deferred
Tags:
Comment:
Fix Babel category sort keys

This actually has nothing to do with my recent category sort changes --
they were always broken. They used $wgUser->getName() instead of
{{PAGENAME}}, so they sorted based on the last one to edit the page.
With new category sort changes, {{PAGENAME}} is redundant, so we don't
even need that.
Modified paths:
  • /trunk/extensions/Babel/Babel.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Babel/Babel.class.php
@@ -339,7 +339,7 @@
340340 // Add to main language category if the level is not zero.
341341 if ( $wgBabelUseMainCategories && ( $level === 'N' || ( $wgBabelUseLevelZeroCategory && $level === '0' ) || $level > 0 ) ) {
342342 // Add category wikitext to box tower.
343 - $r .= "[[Category:{$this->_addFixes( $code,'category' )}|$level{$wgUser->getName()}]]";
 343+ $r .= "[[Category:{$this->_addFixes( $code,'category' )}|$level]]";
344344
345345 BabelAutoCreate::create( $this->_addFixes( "$code", 'category' ), BabelLanguageCodes::getName( $code ) );
346346 }
@@ -349,7 +349,7 @@
350350 if ( !$wgBabelUseSimpleCategories && ( $level === 'N' || ( $wgBabelUseLevelZeroCategory && $level === '0' ) || $level > 0 ) ) {
351351
352352 // Add category wikitext to box tower.
353 - $r .= "[[Category:{$this->_addFixes( "$code-$level",'category' )}|{$wgUser->getName()}]]";
 353+ $r .= "[[Category:{$this->_addFixes( "$code-$level",'category' )}]]";
354354
355355 BabelAutoCreate::create( $this->_addFixes( "$code-$level", 'category' ), $level, BabelLanguageCodes::getName( $code ) );
356356

Status & tagging log