wgNamespaceIds in JavaScript didn't include canonical namespaces. Adding them to...
authorKrinkle <krinkle@users.mediawiki.org>
Tue, 14 Jun 2011 22:49:38 +0000 (22:49 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Tue, 14 Jun 2011 22:49:38 +0000 (22:49 +0000)
commitb3621a2826992c8df009b90dfbc1fb59ef4a55c2
tree66a6894f12caf1b6840634f1cfec6de198c1ba6c
parentf756c92df5e4275cb49e1f5322011f8664a1b8a5
wgNamespaceIds in JavaScript didn't include canonical namespaces. Adding them to it, in a similar way that Language->getNamespaceIds does it for the localized namespaces and the namespace aliases.

Fixes bug in mw.Title constructor when .setNamespace() is used with a canonical namespace on a non-English content-language wiki.
Example: On a German wiki "var foo = new mw.Title('bar').setNamespace('file')" will throw an Error, as wgNamespaceIds only contains localized namespaces + namespace aliases, not canonical ones (in contrary to the assumption that has been made in various places).

(bug 25375) Add canonical namespaces to JavaScript "wgNamespaceIds"
RELEASE-NOTES-1.19
includes/resourceloader/ResourceLoaderStartUpModule.php