Antoine Musso
6a8e32e986
Single messages can be passed as strings to Api::dieUsageMsg()
...
Since r88045
2011-05-19 17:51:16 +00:00
Sam Reed
3441def388
Documentation
...
Remove long deprecated isBot()/isSysop() in ApiMain
2011-05-08 16:48:30 +00:00
Sam Reed
f985524076
More versions added to @deprecated tags
...
Couple of inbound calls fixed up
Some ancient code removed as it's been marked deprecated
2011-05-06 21:50:18 +00:00
Max Semenik
40107fa464
Added a function that returns the list of supported formats to ApiMain
2011-05-03 16:54:16 +00:00
Sam Reed
c8079f0b81
* (bug 27185) API: Add Special:ComparePages
2011-05-01 21:56:02 +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
Bryan Tong Minh
f9a36ee7bf
(bug 27018) Added action=filerevert to revert files to an old version. Copied procedure from FileRevertForm, as most of the verification procedure is simple enough to not warrant the effort of writing a dedicated backend.
...
Further changes:
* Added Status::getErrorsByType() which returns the internal error array untouched
* Added ApiResult::convertStatusToArray() which converts a Status object to something useful for the Api
2011-03-05 17:23:35 +00:00
Alexandre Emsenhuber
60f1302644
Per Platonides, fix for r82686: make ApiUploadTest work again
...
Added option request parameter to User::editToken() and User::matchEditToken() and use them where possible from the api.
Also removed $_SESSION usage since it's no longer needed
2011-03-02 12:52:47 +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
32eb80c15c
A few return type hints
2011-01-30 08:16:13 +00:00
Sam Reed
3403f6d2c3
* (bug 26650) Remove $wgAPICacheHelp in favour of $wgAPICacheHelpTimeout
2011-01-10 18:08:54 +00:00
Sam Reed
2616a18522
Widen documentation header also
2011-01-07 03:12:07 +00:00
Sam Reed
981e47d801
Widen api help splitters
2011-01-07 03:04:03 +00:00
Sam Reed
f63b5040e3
More minor bits of documentation
...
Object type hint on mPrinter
2010-12-23 19:53:28 +00:00
Sam Reed
5ab6724f06
Add some method documentation
2010-12-23 19:24:38 +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
Roan Kattouw
17487e40ba
Replace my old e-mail address with my new one in API comments. A bit outdated (dropped the old one in September '08)
2010-12-22 20:48:10 +00:00
Sam Reed
cc0574856f
Fixup fail from r76191. Thanks Nikerabbit
2010-11-06 16:11:19 +00:00
Sam Reed
84fed26fd4
Add missing credits from r75975
...
Remove a few unused array keys in API foreach loops
Remove part of Html::Hidden comment
2010-11-06 15:10:18 +00:00
Bryan Tong Minh
e9fd126b9a
(bug 25648) API discovery information has been added as RSD link in page <head> and by providing an API module action=rsd. Added hook ApiRsdServiceApis for extensions to add their own service to the services list.
...
Patch by Brion Vibber and Bryan Tong Minh.
2010-10-28 19:20:21 +00:00
Roan Kattouw
9c0b26028f
Revert r74810 (vary API help cache on $wgUser->isAnon()) and move the POST check into the purge module. Also fix the permissions check in action=purge, which was totally broken and based on a misunderstanding of what the 'purge' right means.
2010-10-18 09:19:20 +00:00
Sam Reed
14b6fbb3be
* (bug 24792) API help caching doesn't vary on $wgUser->isAnon(), causes staleness
2010-10-15 17:13:38 +00:00
Sam Reed
4a0c3d8ff5
Comment return types, some explicit class variable declaration
2010-10-09 00:01:45 +00:00
Sam Reed
550271e806
Explicit class variable definition
...
Parameter hints
2010-10-06 21:18:55 +00:00
Sam Reed
3629f272c4
Object return type hints
2010-10-03 22:13:04 +00:00
Chad Horohoe
99a8df3370
Document return values I needed
2010-09-29 18:18:07 +00:00
Sam Reed
9d1e45bf42
Tweak/add some documentation as hints for some code analysis
2010-09-28 01:33:11 +00:00
Sam Reed
ee40f73227
Remove some unused keys from foreach
...
Documentation tweaks
2010-09-25 16:56:03 +00:00
Sam Reed
6c1273bc7d
Fill in missing params from a dieUsage
...
Braces
Fixup parameter documentation
2010-09-25 16:45:41 +00:00
Sam Reed
f07567201f
Remove some unused variables
...
Tweak php doc, "One" is not a type, so insert string in there
2010-09-25 16:37:39 +00:00
Roan Kattouw
4ba555271a
Revert r73510 (trunk version of r73511 ; missed the fact that the latter was a merge). Disabling API modules has been possible since r41268 and is documented at http://www.mediawiki.org/wiki/API:Restricting_API_usage#Disabling_modules
2010-09-22 12:04:24 +00:00
Tim Starling
951791990a
Allow API modules to be disabled in configuration. To replace WMF live hack (see bug 25238).
2010-09-22 08:14:19 +00:00
Platonides
4276502fdb
Follow-up r70970. There's no StubUser any more, so no point in showing the wfDebug on each request.
2010-09-03 21:39:50 +00:00
Sam Reed
2cd63736f5
Widen header documentation
2010-09-03 01:06:06 +00:00
Sam Reed
00ffe08fdb
Align URL's
2010-09-02 23:37:15 +00:00
X!
a1422fa2be
Add format=dump and format=dumpfm, outputs results in PHP's var_dump() format. Finding the type of a variable is a little annoying with txt, and dbg is a little bit harder to parse.
2010-08-09 00:19:55 +00:00
Alexandre Emsenhuber
457eb73b61
Standardised file description headers, added @file
2010-08-07 19:59:42 +00:00
Tim Starling
48862f74d2
Fix for r69776: remove unused variable ApiMain::$mVaryCookie
2010-07-26 07:35:30 +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
46394d4551
Remove some unused globals
2010-07-22 22:00:27 +00:00
Sam Reed
2630065a22
Fix fail from r69755, press save, actually do "LIMIT_SML2, LIMIT_BIG2 are in ApiBase, not ApiMain"
2010-07-22 21:54:19 +00:00
Roan Kattouw
f0c87dbd00
Reverse-merge r69521 from 1.16wmf4: fix OpenSearch caching
2010-07-19 08:19:54 +00:00
Mark A. Hershberger
99e3ca5376
re r69339 use the actual function: s/hasCache/haveCache/
2010-07-15 01:15:55 +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
Bryan Tong Minh
8fc06f1725
Follow-up r69231: servedby is a boolean so will always be non-null.
2010-07-10 10:47:52 +00:00
Chad Horohoe
18d8635d00
(bug 24303) Expose hostname in API results. Show via servedby parameter, added unconditionally on errors
2010-07-10 10:37:39 +00:00
Bryan Tong Minh
55c96b6ca3
Revert r64436, r64437, r64508 per CR r64436
2010-07-09 09:46:05 +00:00
Max Semenik
4da25f6614
requestWriteMode() is deprecated and unused
2010-07-08 19:30:21 +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