r102899 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102898‎ | r102899 | r102900 >
Date:15:37, 13 November 2011
Author:robin
Status:ok
Tags:
Comment:
Do not depend on the level category being configured, when adding the main category (or not). Having $wgBabelMainCategory configured and the level set to false, will now add the main category.
Modified paths:
  • /trunk/extensions/Babel/Babel.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Babel/Babel.class.php
@@ -284,12 +284,14 @@
285285
286286 $r = '';
287287
288 - if ( $wgBabelMainCategory !== false && $wgBabelCategoryNames[$level] !== false ) {
 288+ # Add main category
 289+ if ( $wgBabelMainCategory !== false ) {
289290 $category = self::mReplaceCategoryVariables( $wgBabelMainCategory, $code );
290291 $r .= "[[Category:$category|$level]]";
291292 BabelAutoCreate::create( $category, $code );
292293 }
293294
 295+ # Add level category
294296 if ( $wgBabelCategoryNames[$level] !== false ) {
295297 $category = self::mReplaceCategoryVariables( $wgBabelCategoryNames[$level], $code );
296298 $r .= "[[Category:$category]]";

Follow-up revisions

RevisionCommit summaryAuthorDate
r105909Babel: MFT r102899 r102900 r102912 r105540nikerabbit17:38, 12 December 2011

Status & tagging log