John Du Hart
40f19e6def
Adding context to the API
...
This will probably break something somewhere so when it does please yell at me on IRC and I'll fix it.
2011-10-26 23:27:01 +00:00
Sam Reed
ef861c14ba
Followup r98329
...
Change ApiQueryInfo to match also
2011-09-28 17:01:53 +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
00f0594736
* (bug 28364) add registration date to meta=userinfo
2011-04-10 12:27:32 +00:00
Alexandre Emsenhuber
7fc4255afe
Seems I forgot this file in r85442
2011-04-05 16:28:38 +00:00
Daniel Friesen
c49946aa39
Followup r79433, hide realname from output when realnames are a hidden pref.
2011-03-28 03:25:36 +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
e1bcab1ab8
* (bug 25767) Add userrights properties to allusers and users query lists
...
First part of this bug. Listing of all rights that users have
2011-01-04 01:39:02 +00:00
Daniel Friesen
5b68a32d07
Add a realname option to query=userinfo in the api.
2011-01-01 17:38:15 +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
Sam Reed
a7b545fb40
Tab out for alignment, and normalise capitalisation of first letters
2010-11-03 17:01:21 +00:00
Sam Reed
3013d5baf6
Few explicit class variable definitions
2010-10-01 11:21:46 +00:00
Sam Reed
86fd539c32
Remove some unused variables
...
Add some braces
2010-09-20 14:32:38 +00:00
Alexandre Emsenhuber
457eb73b61
Standardised file description headers, added @file
2010-08-07 19:59:42 +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
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
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
Roan Kattouw
a973430991
Followup to r67554: move getAcceptLang() to WebRequest for general use, per CR.
2010-06-18 18:00:54 +00:00
Sam Reed
18227749a6
Minor followup to r68156, add "user" as implicit group
...
Refactor out and reuse in ApiQueryUserInfo
Add couple more braces to SpecialUserrights
2010-06-17 08:00:42 +00:00
Roan Kattouw
44c199ea0c
API: Add Accept-Language echoer, useful for JS that wants to grab this (not available in JS through conventional means, can't embed it in the page because of Squid caching). Stuck this in meta=userinfo because it doesn't really fit anywhere and userinfo is the only module that's slightly, tangentially related.
2010-06-07 18:53:30 +00:00
Matthew Britton
2ecd319b3b
API: document uiprop=email parameter
2010-05-16 13:23:56 +00:00
Jack Phoenix
7ced9bc569
API: fix copyright symbol, coding style cleanup, more braces
2010-02-26 13:18:56 +00:00
Sam Reed
47c24175d3
Add/remove whitelines to increase readability in API code files
2010-01-23 22:26:40 +00:00
Aryeh Gregor
3758769f0d
stylize.php on API code
...
"I wouldn't object to stylizing the API code to bring it in line with
the rest of MW on principle, but I'm not gonna bother myself." --Roan
<http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60657#c5108 >
If you're seeing this commit in blames, tell your blame tool to ignore
whitespace, e.g., git blame -w or svn blame -x -w.
2010-01-11 15:55:52 +00:00
Alexandre Emsenhuber
270950f611
* (bug 21441) meta=userinfo&uiprop=options no longer returns default options for logged-in users under certain circumstances
...
User::$mOptions is no now only set when calling User::loadOptions() and thus remain null on cache hit and thus the api displays default user settings
2009-12-13 20:55:09 +00:00
Chad Horohoe
a4e5e935b6
Mass convert NULL -> null. Left strings and comments alone, obviously.
2009-12-11 21:07:27 +00:00
Roan Kattouw
3d33524baa
API: Added uiprop=changeablegroups to meta=userinfo
2009-03-26 13:10:13 +00:00
Roan Kattouw
88f35cdf6e
API: Some cleanup
...
* Aggressively intval() numeric things; addresses the concerns raised on bug 11633
* Use ApiQueryBase::addTitleInfo() everywhere
* Remove a drug-induced-looking line from ApiQueryWatchlist.php
2009-02-27 16:03:01 +00:00
Roan Kattouw
decfd47c11
API: (bug 17626) Added uiprop=email to meta=userinfo
2009-02-23 13:34:29 +00:00
Roan Kattouw
a6e101025d
Fix up r43673: reindex the rights array after removing duplicates
2008-11-20 15:15:00 +00:00
Roan Kattouw
c3be8a3034
API: (bug 16398) meta=userinfo&uiprop=rights lists a right twice if it's granted to two groups the user is in
2008-11-20 14:46:10 +00:00
Roan Kattouw
7aff9997f2
API: (bug 12760) meta=userinfo&uiprop=ratelimits doesn't list group-specific rate limits
2008-11-18 16:05:24 +00:00
Roan Kattouw
4c7206a478
Followup to r41257: don't give out a token when we're in JSON callback mode
2008-09-25 15:27:04 +00:00
Roan Kattouw
09ccd3adbe
API: Added uiprop=preferencestoken to meta=userinfo, to retrieve the token for chaning one's preferences through Special:Preferences (and possibly through a future API module if and when the preferences system doesn't suck so much anymore).
2008-09-25 15:20:37 +00:00
Brion Vibber
a4ffac4063
Revert r35178 and normalize User's getID() and setID() methods to prettier getId() and setId()
...
This doesn't accomplish anything, of course, but if you're going to run around changing them, at least make em prettier eh? :)
2008-05-22 16:39:43 +00:00
Aaron Schulz
ae54dbbb3d
*The function is User::getID() not getId()
2008-05-22 14:57:07 +00:00
Alexandre Emsenhuber
087a9f70c5
WARNING: HUGE COMMIT
...
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Brion Vibber
09edeb70bb
Reverting r35060 -- can't reproduce the reported problem so far, but if it exists this should be moved upstream so User::getGroups() and User::getRights() return consistent values themselves
2008-05-19 22:15:17 +00:00
Bryan Tong Minh
fdaf603064
Force indices of groups and rights array to be in order so that the JSON formatter recognizes it as a list instead of a dict in case for some reason rights or groups are removed somewhere in between (as done for sysops on testwiki).
2008-05-19 21:43:52 +00:00
Siebrand Mazeland
79d5225c0e
* remove end of line whitespace
...
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Roan Kattouw
a03d9a8d11
API: Adding uiprop=ratelimits to meta=userinfo. Note that this option only reveals rate limits applicable to the current user, not the entire $wgRateLimits array.
2008-02-01 14:46:46 +00:00
Roan Kattouw
55021c485f
API: Removing duplicate functionality from userinfo; it's implemented in list=users already. Probably forgot to commit this when introducing list=users
2008-02-01 13:43:01 +00:00
Roan Kattouw
19358606a1
API: Changing all modules' getParamDescription(), getAllowedParams() and getDescription() methods to public. ApiParamInfo needs them, and some versions of PHP threw fatal errors because they were protected. Oddly, other versions didn't (maybe because the caller and the callee have a common ancestor?)
2008-01-28 19:05:26 +00:00
Roan Kattouw
a81bd8ad8f
API: Splitting of uiuser part of meta=userinfo to list=users, as discussed on the API list.
2008-01-27 20:28:36 +00:00
Roan Kattouw
df156891a0
API:
...
* Added uiuser parameter to meta=userinfo that gets information about users other than the current user.
* Pretty much completely rewrote userinfo to facilitate this
2008-01-24 17:59:07 +00:00
Roan Kattouw
24c478b815
API: Added uiprop=editcount to meta=userinfo
2008-01-23 20:13:58 +00:00
Roan Kattouw
e6cf4db894
(bug 12413) meta=userinfo missing <query> tag
2007-12-26 17:51:21 +00:00
Victor Vasiliev
0495f90ebb
Revert r28215: incorrectly moved files
2007-12-06 18:33:18 +00:00
Victor Vasiliev
4e4cdf079e
Create includes/api/query for Query API and includes/api/edit for Edit API
2007-12-06 18:22:15 +00:00
Roan Kattouw
4876b25765
API: Getting a list of all user preferences is easy, so let's just do that
2007-11-03 16:08:43 +00:00
Yuri Astrakhan
947fec8906
Per Brion's suggestion, fixed blocker user detection: User::whoIs($wgUser->blockedBy());
2007-08-01 20:11:29 +00:00
Yuri Astrakhan
c4aad95b10
API: Added meta=userinfo module to get data about the currently logged-in user.
2007-07-31 17:53:37 +00:00