Commit graph

169 commits

Author SHA1 Message Date
Aaron Schulz
3a0a647efb FU r106514: use base 16 SHA-1 to be consistent with image info 2011-12-18 16:35:45 +00:00
Aaron Schulz
02e3ce636a Kill some useless code in r106514 2011-12-17 23:14:39 +00:00
Aaron Schulz
21ee783cbe Expose rev_sha1/ar_sha1 to API (bug 21860) 2011-12-17 18:27:38 +00:00
Robin Pepermans
be2de16942 update all core usage of deprecated Title::userCanRead() 2011-12-13 11:05:30 +00:00
Sam Reed
9457d80c3f * (bug 32415) Empty page get no size attribute in API output 2011-12-11 18:39:31 +00:00
Alexandre Emsenhuber
55ec0e84aa Use ParserOptions::newFromContext() instead of 'new ParserOptions' to use the local context and not $wgUser or $wgLang 2011-12-11 10:16:32 +00:00
Sam Reed
53000baecf Oh noes, moar http:// -> https:// 2011-11-28 15:43:11 +00:00
John Du Hart
2e7d867478 Removed the 'eclipse helper' bit on top of every API module
It's a parctice that dates back to 2006 when the API was first written, and frankly isn't covered by the coding conventions. Same thing with the docblocks, they're all copypasted with some bits changed and don't even make sense if you look at them in the genereated code docs.
I don't feel that any of us depend on this anymore (get a better IDE), so in the inerest of consistancy it's time we said goodbye to it.
2011-11-16 00:17:26 +00:00
Alexandre Emsenhuber
2b78de3f02 Made DifferenceEngine use a context instead of global variables and updaters calls to constructor in core 2011-11-10 13:06:52 +00:00
Sam Reed
fa65fa3243 Documentation
Deprecated code updates
2011-10-27 00:46:17 +00:00
Antoine Musso
95027be62c (bug 31345) document API Revisions parameters as enum
Patch by Brad Jorsch.
2011-10-20 14:28:41 +00:00
Bryan Tong Minh
c18151c38c (bug 29392) Setting the start or end parameter now works with lists blocks, categorymembers, deletedrevs, logevents, protectedtitles, usercontributions and watchlist in Postgres.
Since all those used ApiQueryBase::addWhereRange, added ApiQueryBase::addTimestampWhereRange, which does automagic timestamp conversion. Not tested whether this actually fixes problems in Postgres, but at least the API modules are still functional in SQLite
2011-10-06 20:46:24 +00:00
Alexandre Emsenhuber
da4edaaf40 Call Linker methods statically 2011-09-16 19:35:14 +00:00
Sam Reed
a5628f5734 Based on diff to wikia, set more functions consistently public rather than protected 2011-08-17 22:24:21 +00:00
Sam Reed
d5e46f9614 Followup r92396
More modules documented, pretty much only action=query&list= to be done (ie links added where documentation pages exist already)
2011-07-17 16:51:11 +00:00
Sam Reed
8d38e2a8f5 * (bug 28897) rvparse doesn’t seem to work with rvsection 2011-06-05 16:34:09 +00:00
Max Semenik
220279a352 Rm all mentions of "this module" in API action descriptions. They are supposed to be read by API users, not MW coders, thus internal terminology shouldn't be used here. 2011-04-25 14:05:57 +00:00
Chad Horohoe
783d4e0862 Remove @static from all over the place. That's what the static keyword is for, this being PHP5 and all 2011-04-21 00:07:09 +00:00
Sam Reed
8c6f2012b9 * (bug 27670) Ordering by timestamp (and usage of start and end) isn't as clear in auto generated document, as it is on mw.org
where dir = (newer|older)

Will look at doing (asc|desc)(ending)?
2011-03-12 23:39:15 +00:00
Sam Reed
27ca6b2fa8 Tweak comments, remove some unused stuff.
Explicit definitions, move a few minor bits around
2011-02-27 21:10:11 +00:00
Sam Reed
fa64025161 More parameter documentation 2011-02-19 00:30:18 +00:00
Sam Reed
dcc3dae441 Followup r79470, removed unused variable 2011-01-02 04:46:41 +00:00
Sam Reed
5b1a5aa763 ApiQueryRevisions: Switch from manual Cache checking, to use $article->getParserOutput()
ApiParse: Fix comment typo
2011-01-02 03:20:45 +00:00
Sam Reed
1f05665cf3 Styleli[zs]e the API up to date (Been a while since) 2010-12-30 17:06:09 +00:00
Sam Reed
6309c920dd Delete all the "API for MediaWiki 1.8+" comments
Add since to ApiQueryQueryPage
2010-12-22 20:52:06 +00:00
Happy-melon
6b5d1c1c0e Revert rollback implementation of r78585, r78599. The way the API is set up, it's not possible to have some tokens on the new system and some on the old. 2010-12-20 19:03:00 +00:00
Happy-melon
ff2f6606b0 Follow-up r78585: Make Token::PERSISTENT the default, so no need to specify it. That will be more usual, I expect. 2010-12-19 15:23:22 +00:00
Happy-melon
e0bec9555e Merge in Token class from my branch; would like some second opinions on the concept. This seeks to replace the much-abused $wgUser->editToken() token generator, 90% of the uses of which are not for editing but rather general actions.
Implemented for rollback mainly as a proof-of-concept; obvious further targets are patrol links and HTMLForm.
2010-12-18 23:07:30 +00:00
Roan Kattouw
6fff1a0529 Followup to r75266: remove warning "rvlimit may not be less than 1 (set to )" when rvparse is set but rvlimit is not set 2010-10-27 11:50:20 +00:00
Bryan Tong Minh
e9d2674e11 Added rvparse to parse revisions. For performance reasons if this option is used, rvlimit is enforced to 1. 2010-10-23 16:41:20 +00:00
Sam Reed
2a103ae8d7 Few more explicit class variable declarations 2010-10-20 20:16:46 +00:00
Sam Reed
8b03a013a1 Fix some method documentation
Fix some typos

Some explicit class members
2010-10-20 18:50:33 +00:00
Sam Reed
9e549e437a Followup r74392. Also cache result of getUser call (may be called twice) 2010-10-17 18:54:39 +00:00
Sam Reed
56f6d2975f Followup r71831, User::newFromName, not newFromText 2010-10-06 21:16:28 +00:00
Roan Kattouw
900b9f377f Fix indentation 2010-09-27 13:06:35 +00:00
Sam Reed
5b23cea5c7 * (bug 24166) API error when using rvprop=tags
Move addition of revision table to after other joins
2010-09-01 16:47:21 +00:00
Sam Reed
68b89f0b6b Followup r71831, it's not mutually exclusive!
Add missing if
2010-08-28 00:54:16 +00:00
Sam Reed
fd976ad072 Part of Bug 19195 - Make user IDs more readily available with the API
ApiQueryAllUsers, ApiQueryImageInfo and ApiQueryRevisions exposing user_id
2010-08-28 00:37:48 +00:00
Alexandre Emsenhuber
457eb73b61 Standardised file description headers, added @file 2010-08-07 19:59:42 +00:00
Bryan Tong Minh
0e61296f98 (bug 24564) Fix fatal errors when using list=deletedrevs, prop=revisions or one of the backlinks generators with limit=max. 2010-07-28 11:30:14 +00:00
Platonides
958a998611 Remove double globals. 2010-07-25 19:45:52 +00:00
Sam Reed
5387b8a806 Stylize API up to date
Fix spaces from r69755

Minor update to RELEASE-NOTES per r69753
2010-07-23 07:33:40 +00:00
Tim Starling
b2dc451c82 Rewrote r69339 etc. to clean up API cache header handling.
* Introduced a "cache mode" concept to simplify the header generation code, and to avoid odd results when conflicting cache header requests are received from submodules, or at least to formalise the handling of such cases.
* Made the cache mode private by default, so that code written in ignorance of caching tends to be safe. If different query modules are used in a single request, private caching is preferred over public caching.
* Removed the "must-revalidate" option from all CC headers, this is really specific to page views with a hacked squid in front, I don't think it's applicable here.
* Made the watchlist module private. This is really the definition of private data. There's nothing in the HTTP spec that says the URL for a CC:public request is private and can't be leaked. CC:private provides protection against unknown proxy behaviour.
* In ApiQueryAllmessages: avoid calling $wgLang->getCode() to check if it's necessary to make a new $wgLang when lang= is specified, since this is the only thing that unstubs $wgUser.
* Removed "FIXME: should this check $user instead of $wgUser?" Answer is no.
2010-07-23 07:17:56 +00:00
Sam Reed
8f1d2cb199 Big blitz on unused variables (a lot of $db = $this->getDb() ) 2010-07-22 22:13:21 +00:00
Brian Wolff
2f5d5edebf Fix fatal error from undefined $wgParser. 2010-07-19 05:57:23 +00:00
Mark A. Hershberger
e28aaea397 follow up r69339:
* Add a missing setVaryCookie for consistency
* don't cache result when token is given in ApiFeedWatchlist
2010-07-14 21:46:52 +00:00
Roan Kattouw
70824ccccc API: Make output containing private or user-specific data uncacheable for logged-in users by setting Vary: Cookie or Cache-Control: private, whichever is appropriate. Fixes instances in core and WMF-deployed extensions only. Without this change, the output of requests like ?action=query&list=recentchanges&rcprop=patrolled&smaxage=3600 would be cached in Squid and viewable for anyone using the same URL, even if they don't have patrol rights. Other, more serious exploits are also possible. Also avoid using $wgUser in one place, kill some unused global $wgUser; instances and tweak a comment. 2010-07-14 19:00:54 +00:00
Sam Reed
2d21295243 * (bug 23473) - Give description of properties on all modules
Commit patch by John Du Hart with a few minor tweaks/fixes
2010-06-23 19:36:26 +00:00
Derk-Jan Hartman
921619b119 Correct the address of the FSF in some of the GPL headers
59 Temple Place -> 51 Franklin Street
2010-06-21 13:13:32 +00:00
Sam Reed
faf34b4073 Per http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66168#c7252 switch while ( $row = $db->fectchObject( $res ) ) to foreach ( $res as row )
On ApiQueryUsers switch $r to row, and remove nested brackets
2010-06-20 18:48:34 +00:00