Commit graph

40 commits

Author SHA1 Message Date
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
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
a5628f5734 Based on diff to wikia, set more functions consistently public rather than protected 2011-08-17 22:24:21 +00:00
Sam Reed
6e84e9ccd9 Followup r92396, add help urls for most of the core (non query) modules 2011-07-17 16:38:24 +00:00
Sam Reed
8edf4a2d92 Fix trailing whitespace
Swap methods that call $this->getResult() to use temporary variable
2011-06-29 23:46:39 +00:00
Max Semenik
2da3d34301 Oops, forgot to revert r86954 in r86973, not needed anymore 2011-04-26 19:23:23 +00:00
Max Semenik
11822535e7 Without this array_values(), user groups will be exported to JSON as object instead of array 2011-04-26 17:29:57 +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
fcb749bd0c Function return type hints
Explicit class variable definition
2010-10-28 00:04:48 +00:00
Sam Reed
3e3ea127fd Minor followup to r74095, remove method as all it does is call it's parent (Thanks to Nikerabbit on IRC)
Remove leading tab from ApiMove
2010-10-01 20:17:01 +00:00
Sam Reed
42b5c265c0 * (bug 25248) API: paraminfo errors with certain modules
Added a needsToken() function, rather than calling getTokenSalt, which can throw silly errors due to dependencies on parameters
2010-10-01 20:12:50 +00:00
Sam Reed
c48bbaec3c Remove error from ApiUserrights getPossibleErrors, it doesn't explicitally throw an error for missing user param. Does some other fancy errors from the special page. We should have a way for that to tell us it throws some errors....
Remove trailing whitespace
2010-10-01 19:37:38 +00:00
Alexandre Emsenhuber
457eb73b61 Standardised file description headers, added @file 2010-08-07 19:59:42 +00:00
X!
1afd723c5b Followup to r70460 and r70461: Use true instead of 1 2010-08-04 14:29:39 +00:00
X!
8b466d3d0d Followup to r70460: Committed wrong version of ApiBase.php, convert all core API modules to PARAM_REQUIRED syntax 2010-08-04 14:15:33 +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
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
50b88a5b1b Remove arrays from getDescription where we are only using 1 line 2010-05-25 20:46:09 +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
Mark A. Hershberger
9c7a7e57f0 * New UploadFromUrlJob class to handle Upload-by-Copy
* Define variable for ApiUserrights.php that wasn't defined before.
* Add convertVerifyErrorToStatus and getVerificationErrorCode to
  UploadBase to translate error consts since UploadFromUrl will
  need a message to display to end-users.
* refactor mime-checking out of UploadBase::verifyFile into
  UploadBase::verifyMimeType
* Make UploadBase::verifyFile always return arrays for errors
* Use HttpFunctions instead of custom curl handler for async downloading
* TODO: Need a way to feed errors back to the requestor
* TODO: Need to add watchlist param handling and warnings checks.
2010-04-17 02:43:13 +00:00
Alexandre Emsenhuber
ce2e172307 * part of bug 23119: removed WikiError stuff for Special:Userrights, also updated CentralAuth extension
* fixed E_NOTICE in Special:GlobalGroupMembership when the user cannot change global permissions
2010-04-16 15:56:48 +00:00
Sam Reed
659a0b2912 Refactor getTokenSalt to use caching getUser/getTitle in ApiRollback and ApiUserrights 2010-04-10 13:33:24 +00:00
Sam Reed
9a141fbab5 Revert r64825 2010-04-10 12:29:44 +00:00
Sam Reed
bdac091123 Reuse created instance of UserrightsPage 2010-04-09 20:02:29 +00:00
Jack Phoenix
7ced9bc569 API: fix copyright symbol, coding style cleanup, more braces 2010-02-26 13:18:56 +00:00
Sam Reed
59e656c23b Stylize on Api
Manual layout improvements in ApiFeedWatchlist
2010-02-19 01:25:57 +00:00
Sam Reed
0e8b0b41ac Refactor requiresToken to getTokenSalt - Returns salt if exists, null if no salt, else false if no token required
Move sessionfailure (token validation checking) up a couple of levels

Part of bug 21991

Followup to r62482 and r62504
2010-02-15 23:53:43 +00:00
Sam Reed
80f9448690 Start of "Bug 21991 - Move common query parameter (uc, rc) validation, token requiringness/checking to ApiBase/Similar"
Move token requringness check to the ApiMain

Adding an exception if we're using "gettoken" (block/unblock)

Remove array( 'missingparam', 'token' ), from the getPossibleErrors of modules that set requireToken method to true
2010-02-14 22:20:27 +00:00
Sam Reed
d2d950d256 Start of blanket coverage of dieUsageMsg in getPossibleErrors
Only basic ones done.

Couple of other modules done manually
2010-02-13 00:09:05 +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
Alex Z
68596ac79c merge most of r56515 back to trunk (changing UserrightsPage::fetchUser to non-static)
Fixing ApiQueryUsers so it should work properly for interwiki users
2009-09-17 16:21:27 +00:00
Roan Kattouw
9e78c71b1e API: Make it possible to fetch userrights tokens for interwiki users; make UserrightsPage::fetchUser() static 2009-09-10 13:44:49 +00:00
Roan Kattouw
87a1cd7980 Remove ugly userrights-CentralAuth hack introduced in r48970 and friends:
* Make UserrightsForm::doSaveUserGroups(), addLogEntry() and helpers non-static again so CentralAuth can override them; remove the short-lived UserRightsLogEntry hook
* Let UserrightsForm::fetchUser() return a WikiErrorMsg on failure
* In ApiUserrights, use an instance of the UserrightsPage class rather than calling its methods statically. This also enables interwiki userrights in this module
* Add some messages to ApiBase::$messageMap
2009-03-29 16:39:42 +00:00
Roan Kattouw
549b1688cc Redo r48746 (API userrights, reverted in r48909 and r48910) in a way that doesn't break CentralAuth. Basically, this works around PHP's inability (at least in < 5.3) to override static methods by adding a hook. Changes to CentralAuth in next commit. 2009-03-28 19:08:47 +00:00
Andrew Garrett
d4d0329547 Revert r48746 (API userrights). Breaks Special:GlobalGroupMembership by changing overridden methods to static methods, which cannot be overridden. Also reverts r48747, r48814, r48778, r48775 2009-03-27 05:59:42 +00:00
Roan Kattouw
4f4a29e5a4 svn:keywords=Id 2009-03-24 16:08:29 +00:00
Roan Kattouw
a827d2358e Followup to r48746: forgot to add new file 2009-03-24 16:06:57 +00:00