Index: trunk/phase3/languages/Language.php |
— | — | @@ -256,6 +256,14 @@ |
257 | 257 | $this->namespaceNames[NS_PROJECT_TALK] = |
258 | 258 | $this->fixVariableInNamespace( $talk ); |
259 | 259 | } |
| 260 | + |
| 261 | + # Sometimes a language will be localised but not actually exist on this wiki. |
| 262 | + $validNamespaces = MWNamespace::getValidNamespaces(); |
| 263 | + foreach( $this->namespaceNames as $key => $text ) { |
| 264 | + if ( ! in_array( $key, $validNamespaces ) ) { |
| 265 | + unset( $this->namespaceNames[$key] ); |
| 266 | + } |
| 267 | + } |
260 | 268 | |
261 | 269 | # The above mixing may leave namespaces out of canonical order. |
262 | 270 | # Re-order by namespace ID number... |