Commit graph

153 commits

Author SHA1 Message Date
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
Sam Reed
a90a0783de Nuke $db->freeResult() from Api stuffs 2010-06-20 17:48:21 +00:00
Alexandre Emsenhuber
317fbb5718 Fixed fatal error because of undefined $wgParser variable 2010-06-01 16:21:00 +00:00
Sam Reed
e55ed729c4 Mixture of things.
Couple of class comments

Normalisation of "." usage at end of lines (removed)

Normalisation of {prefix}parameter as per bug 23461
2010-05-11 22:30:18 +00:00
Sam Reed
c9574e66cc * (bug 23460) Parse action should have a section option
Also add uselang parameter, not originally added in r63428

Clarify section description in both. Move global into if statement
2010-05-10 18:27:58 +00:00
Sam Reed
be9a5b28a6 Move some braces to match coding styles 2010-05-10 17:12:09 +00:00
Sam Reed
f7330671b5 Remove blank comment line 2010-05-10 16:29:29 +00:00
Matthew Britton
6001a45270 (bug 22290) Inconsistent presence of "comment" field in prop=revisions versus list=recentchanges 2010-03-31 15:26:17 +00:00
Jack Phoenix
eba6c94002 API: fix copyright symbol, coding style cleanup, more braces 2010-02-24 14:45:19 +00:00
Sam Reed
9e44e9295d Fixup spaces to tabs from r62404 2010-02-14 14:29:24 +00:00
Sam Reed
c552a2e2af dieUsage getPossibleErrors in ApiQuerySearch and ApiQueryRevisions 2010-02-13 01:28:26 +00:00
Sam Reed
2081a0693f Rest of dieUsageMsg in getPossibleErrors 2010-02-13 00:28:27 +00:00
Chad Horohoe
5f8149bb37 Followup r61957, define $index 2010-02-04 14:55:53 +00:00
Tim Starling
6892c5536d Fix for r58399 (missing index on change_tag table), using the patch from bug 22032 by Gurch, but altered to respect $wgOldChangeTagsIndex. 2010-02-03 23:30:19 +00:00
Sam Reed
c5ad4b031f bug 18427 - Parsed comment on prop=revision 2010-01-31 20:59:50 +00:00
Sam Reed
abe67e2523 ParamDescriptions for ApiQueryRevisions were inconsistently starting with upper and lower case.
Normalise to Upper case (as per rest of API)
2010-01-31 19:46:23 +00:00
Tim Starling
0319924c58 Fix careless errors in r61442 and r61444. 2010-01-29 00:51:08 +00:00