dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9b69f5
)
(bug 24837) Fix issue where namespaces which were localised but not defined were...
author
Andrew Garrett
<werdna@users.mediawiki.org>
Fri, 20 Aug 2010 05:32:24 +0000
(
05:32
+0000)
committer
Andrew Garrett
<werdna@users.mediawiki.org>
Fri, 20 Aug 2010 05:32:24 +0000
(
05:32
+0000)
languages/Language.php
patch
|
blob
|
history
diff --git
a/languages/Language.php
b/languages/Language.php
index
b0b2a4c
..
3056143
100644
(file)
--- a/
languages/Language.php
+++ b/
languages/Language.php
@@
-256,6
+256,14
@@
class Language {
$this->namespaceNames[NS_PROJECT_TALK] =
$this->fixVariableInNamespace( $talk );
}
+
+ # Sometimes a language will be localised but not actually exist on this wiki.
+ $validNamespaces = MWNamespace::getValidNamespaces();
+ foreach( $this->namespaceNames as $key => $text ) {
+ if ( ! in_array( $key, $validNamespaces ) ) {
+ unset( $this->namespaceNames[$key] );
+ }
+ }
# The above mixing may leave namespaces out of canonical order.
# Re-order by namespace ID number...