Last modified: 2009-12-30 05:13: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 T17609, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15609 - Add more flags to prop=info
Add more flags to prop=info
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.14.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
: patch, patch-need-review
Depends on:
Blocks: 11
  Show dependency treegraph
 
Reported: 2008-09-15 04:55 UTC by Matt Johnston
Modified: 2009-12-30 05:13 UTC (History)
3 users (show)

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


Attachments
Proposed patch (4.39 KB, patch)
2008-09-15 04:55 UTC, Matt Johnston
Details

Description Matt Johnston 2008-09-15 04:55:05 UTC
Created attachment 5333 [details]
Proposed patch

There needs to be a simple (and lightweight) way of getting information on a page, that is easy to parse and only provides key info. Using query with prop=info provides some information, but it is more difficult to parse (structure changes depending on whether it's interwiki etc) and provides information that's not needed for just basic checks.

I mainly wrote this for use in bug 11 or related inter-wiki access, where you only want basic stuff for crafting links, with the URLs for both blue and red links.

This patch adds action=pagestatus, which gives info like whether it exists, whether it's a redirect or interwiki, whether it's readable to the user, and the view and edit URLs. It will follow one layer of interwiki links, but not two (e.g. wikipedia:de:)
Comment 1 Roan Kattouw 2008-09-16 13:45:08 UTC
I'm not going to introduce a new module for this, but some of the flags this module provides (external, readable, url, editurl) can be added as options to prop=info. The others (existence and redirect checking) are already done.

Changing bug title to reflect this.
Comment 2 Matt Johnston 2008-09-16 22:57:28 UTC
How lightweight is prop=info? I was worried that the revision and length related values would be strong on the database (if this is intended to be called by another wiki on a theoretically large number of pages), and how lightweight this is on HTTP (if another wiki wanted to call it). Although with the combining of the pages, HTTP overhead would probably be less.
Comment 3 Roan Kattouw 2008-09-17 13:33:37 UTC
(In reply to comment #2)
> How lightweight is prop=info? I was worried that the revision and length
> related values would be strong on the database (if this is intended to be
> called by another wiki on a theoretically large number of pages), and how
> lightweight this is on HTTP (if another wiki wanted to call it). Although with
> the combining of the pages, HTTP overhead would probably be less.
> 

Nothing in the API is hard on the database, because we're well aware of the fact someone could call any query repeatedly with up to 5000 titles. prop=info is one of the more lightweight modules as long as inprop=protection isn't set.
Comment 4 Roan Kattouw 2008-09-25 15:58:34 UTC
Added inprop=url and inprop=readable in r41261. The rest of the properties from the patch are already available:
* Non-existent pages have the 'missing' attribute
* Redirects have the 'redirect' attribute
* Interwiki titles (external) are in the <interwiki> element

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


Navigation
Links