Index: trunk/phase3/maintenance/addwiki.php |
— | — | @@ -43,17 +43,18 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | public function execute() { |
47 | | - global $IP, $wgLanguageNames, $wgDefaultExternalStore, $wgNoDBParam; |
| 47 | + global $IP, $wgDefaultExternalStore, $wgNoDBParam; |
48 | 48 | |
49 | 49 | $wgNoDBParam = true; |
50 | 50 | $lang = $this->getArg(0); |
51 | 51 | $site = $this->getArg(1); |
52 | 52 | $dbName = $this->getArg(2); |
| 53 | + $languageNames = Language::getLanguageNames(); |
53 | 54 | |
54 | | - if ( !isset( $wgLanguageNames[$lang] ) ) { |
| 55 | + if ( !isset( $languageNames[$lang] ) ) { |
55 | 56 | $this->error( "Language $lang not found in \$wgLanguageNames", true ); |
56 | 57 | } |
57 | | - $name = $wgLanguageNames[$lang]; |
| 58 | + $name = $languageNames[$lang]; |
58 | 59 | |
59 | 60 | $dbw = wfGetDB( DB_MASTER ); |
60 | 61 | $common = "/home/wikipedia/common"; |