Index: branches/SerbianVariants/phase3/maintenance/generateSitemap.php |
— | — | @@ -267,8 +267,8 @@ |
268 | 268 | // generate pages for language variants |
269 | 269 | if($wgContLang->hasVariants()){ |
270 | 270 | $variants = $wgContLang->getVariants(); |
271 | | - unset($variants[array_search($wgContLang->getCode(),$variants)]); // we don't want default |
272 | 271 | foreach($variants as $vCode){ |
| 272 | + if($vCode==$wgContLang->getCode()) continue; // we don't want default variant |
273 | 273 | $entry = $this->fileEntry( $title->getFullVariantURL($vCode), $date, $this->priority( $namespace ) ); |
274 | 274 | $length += strlen( $entry ); |
275 | 275 | $this->write( $this->file, $entry ); |