Last modified: 2014-11-11 21:04:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43881, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41881 - Add wgContentNamespaces to mw.config
Add wgContentNamespaces to mw.config
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.21.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-08 11:23 UTC by Helder
Modified: 2014-11-11 21:04 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2012-11-08 11:23:27 UTC
Currently it seems the list of content namespaces of the wiki is not available for scripts.

Would it be possible to provide access to it through mw.config.get('wgContentNamespaces')?
Comment 1 Krinkle 2012-11-08 14:52:17 UTC
@Roan, @Trevor

There are a lot of parameters currently in mw config that are really inter-related and would suit having their own module, and therewith avoid bloating the startup module.

Like we (almost) did for mw.user, though it currently still fetches its info through wgUserName...

Basically data provider modules (generated like LanguageDataModule) for classes. In the case of wgContentNamespaces it would be provided by the data provider module for mw.Title and accessible through some static method of mw.Title.

I would like to put a stop on putting more variables in mw.config until we figure out a way to deal with this. Reason being that whatever we put in it, we have to support for a long while.

As for the current needs: I believe this information is available in the API.
Comment 2 Krinkle 2012-11-08 14:52:47 UTC
See also bug 39813.
Comment 3 Kelson [Emmanuel Engelhart] 2014-11-11 16:40:18 UTC
It seems that I need this too in order to be able to know about all the content namespaces (outside the main namespace - like the "portal" namespace on Wikipedia) and mirror them all for full offline dumps.
Comment 4 Nemo 2014-11-11 21:04:19 UTC
Comment 3 was about http://sourceforge.net/p/kiwix/feature-requests/818 , which has now been fixed by using the API instead (action=query&meta=siteinfo&siprop=namespaces).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links