r63935 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63934‎ | r63935 | r63936 >
Date:22:15, 18 March 2010
Author:tstarling
Status:ok
Tags:
Comment:
Fix reference to lazy-initialised global $wgLanguageNames.
Modified paths:
  • /trunk/phase3/maintenance/addwiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/addwiki.php
@@ -43,17 +43,18 @@
4444 }
4545
4646 public function execute() {
47 - global $IP, $wgLanguageNames, $wgDefaultExternalStore, $wgNoDBParam;
 47+ global $IP, $wgDefaultExternalStore, $wgNoDBParam;
4848
4949 $wgNoDBParam = true;
5050 $lang = $this->getArg(0);
5151 $site = $this->getArg(1);
5252 $dbName = $this->getArg(2);
 53+ $languageNames = Language::getLanguageNames();
5354
54 - if ( !isset( $wgLanguageNames[$lang] ) ) {
 55+ if ( !isset( $languageNames[$lang] ) ) {
5556 $this->error( "Language $lang not found in \$wgLanguageNames", true );
5657 }
57 - $name = $wgLanguageNames[$lang];
 58+ $name = $languageNames[$lang];
5859
5960 $dbw = wfGetDB( DB_MASTER );
6061 $common = "/home/wikipedia/common";

Follow-up revisions

RevisionCommit summaryAuthorDate
r63936MFT r63935: Fix reference to lazy-initialised global $wgLanguageNames.tstarling22:16, 18 March 2010
r66601MFT r63935: Fix reference to lazy-initialised global $wgLanguageNameststarling03:44, 18 May 2010

Status & tagging log