Last modified: 2011-10-06 20:19:44 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 T32708, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30708 - Add boolean properties for isWatchable/isMovable/etc. to meta=siteinfo&siprop=namespaces
Add boolean properties for isWatchable/isMovable/etc. to meta=siteinfo&siprop...
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.20.x
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-02 19:52 UTC by Umherirrender
Modified: 2011-10-06 20:19 UTC (History)
5 users (show)

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


Attachments
added namespace states to meta=siteinfo (2.15 KB, patch)
2011-09-02 19:52 UTC, Umherirrender
Details

Description Umherirrender 2011-09-02 19:52:53 UTC
Created attachment 9005 [details]
added namespace states to meta=siteinfo

I am missing some namespaces states, like watchable, movable and so on in the api output.

I have create a patch with some useful states.

I have rename the method MWNamespace::isMain to MWNamespace::isSubject, because there is MWNamespace::getSubject and not MWNamespace::getMain, looks not consistent.

Feel free to modify the patch or to WONTFIX this bug, if you think, that the stats are not needed.

Thanks.
Comment 1 Umherirrender 2011-09-03 13:13:27 UTC
s/stats/states/

You can it also call properties or so one. I have not found a preferred word in MediaWiki.
Comment 2 Krinkle 2011-09-12 23:07:32 UTC
Depending on where you would use/need this for, I'm not sure this is a good idea.

There is a difference between MWNamespace::isWatchable/isMovable returning true, and a user being allowed to move or watch a page in a certain namespace.

For one, the user may not have the appropriate user right. Secondly, custom made namespaces (ie. Portal: ) are not included in these checks, since extensions cannot hook into this.

For example, ResourceLoader2 is introducing a namespace "Gadget definition", which, just like the Category-namespace in core, can not be moved. However, it would show here is moveable since the hook that the extension tabs into is not used here. MWNamespace is pretty much for core namespaces only.

So, since custom namespaces and user rights are not considered. It'd suggest WONTFIX-ing this. I do, however, welcome an ApiUserCan-ish module (which is passed a title and a user right). This module could also be used to check if a file can or can't be uploaded. As well as many other things.

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


Navigation
Links