Commit graph

40 commits

Author SHA1 Message Date
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