r81825 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81824‎ | r81825 | r81826 >
Date:16:49, 9 February 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Quick fix for PHP warnings in loop below
Modified paths:
  • /trunk/extensions/LanguageSelector/LanguageSelector.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LanguageSelector/LanguageSelector.php
@@ -99,15 +99,15 @@
100100 $wgLanguageSelectorShowAll, $wgCommandLineMode;
101101 global $wgUser, $wgLang, $wgRequest, $wgCookiePrefix, $wgCookiePath, $wgHooks;
102102
103 - if ( $wgCommandLineMode ) {
104 - return true;
105 - }
106 -
107103 if ( $wgLanguageSelectorLanguages === null ) {
108104 $wgLanguageSelectorLanguages = array_keys( Language::getLanguageNames( !$wgLanguageSelectorShowAll ) );
109105 sort( $wgLanguageSelectorLanguages );
110106 }
111107
 108+ if ( $wgCommandLineMode ) {
 109+ return true;
 110+ }
 111+
112112 $setlang = $wgRequest->getVal( 'setlang' );
113113 if ( $setlang && !in_array( $setlang, $wgLanguageSelectorLanguages ) )
114114 $setlang = null; //ignore invalid

Status & tagging log