Commit graph

76 commits

Author SHA1 Message Date
Roan Kattouw
bd3bf5d2a7 * Split patrol code
** Backend code moved to RecentChange::reallyMarkPatrolled() and doMarkPatrolled()
** Adapted Article::markpatrolled()
* (bug 15466) Added action=patrol to the API. Modified patch by Soxred93
* Added rctoken=patrol to list=recentchanges
* Detect duplicate warnings in ApiBase::setWarning()
2008-09-04 15:17:51 +00:00
Bryan Tong Minh
cb6b08b17b User::editToken expects the salt as an array, not as variable length argument list. 2008-07-08 08:42:27 +00:00
Tim Starling
fd1854de57 Fix silent failure in PHP 5.1.x or older. The callback for static functions is array('class', 'method'). 2008-07-07 07:57:24 +00:00
Roan Kattouw
07db2080a5 Fix regression from r37046: tokens should not be supplied when in JSON callback mode. Also remove ApiQueryBase::getTokenFlag() which is now obsolete. 2008-07-05 11:18:50 +00:00
Roan Kattouw
0104fa1f0c Rewritten the way the API handles tokens:
* Instead of hardcoding stuff all over the place, use callbacks
* Extensions can now add their own tokens to prop=info or prop=revisions using hooks
2008-07-04 12:07:02 +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
Aaron Schulz
bf63e619a6 Actually, page not always selected. Add this only when needed. 2008-05-13 20:02:25 +00:00
Aaron Schulz
ae152b63bf Actually specify page_id=rev_page to avoid cartesian join bringing the site down again 2008-05-13 19:58:12 +00:00
Roan Kattouw
22bab7ac08 $token is a parameter, so it's set by extractRequestParams() 2008-05-13 10:53:12 +00:00
Bryan Tong Minh
c316a2d6d3 ApiQueryRevisions now uses the Revision backend. This allows a more proper handling of rev_deleted. Also in case rev_size is filled on demand (bug 12188) there is only need to do this in one place. 2008-05-13 10:42:32 +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
bfed011165 API: Added rvsection parameter to prop=revisions to allow fetching the content of a certain section only 2008-03-14 13:07:38 +00:00
Roan Kattouw
69653bd247 API: Fixing limit=max output; previous implementation threw fatal errors under certain conditions and didn't accomodate for some modules having different limits in some cases. 2008-02-25 14:12:55 +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
Rotem Liss
9d02a8c560 Quick solution for problems with limit=max when using slow queries: allowing modules to delay the parsing of limit=max until they get the actual maximum values, and making them parse it by themselves. 2008-01-05 10:05:34 +00:00
Roan Kattouw
5d8f2177c5 API:
* Add list=allcategories module
* Fix token-related E_NOTICEs
2007-12-10 15:55:12 +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
Daniel Cannon
7282f1a341 API: Standardize limits. Use ApiBase constants to avoid similar breakage and inconsistencies in the future. 2007-12-05 06:32:17 +00:00
Roan Kattouw
09149d5082 Reverting prop=revisions diff generation: way too expensive and DoS-vulnerable 2007-12-02 00:22:32 +00:00
Roan Kattouw
7e6bcd9e5a Revert r28030: the example is valid. The fact that it doesn't work on Wikipedia is a bug that has been fixed on trunk already. 2007-12-01 17:53:42 +00:00
Victor Vasiliev
28107fc284 Remove invalid example from ApiQueryRevisions 2007-12-01 17:48:49 +00:00
Roan Kattouw
690accbd08 Making this actually work. I feel so stupid. 2007-12-01 15:13:29 +00:00
Roan Kattouw
2b107e7ece API:
* Adding rollback tokens to prop=revisions
* Fixing bug that broke prop=revisions multipage mode
* Adding some comments on diff formatters
2007-12-01 15:08:57 +00:00
Victor Vasiliev
c1e259c8d7 * Fix rvdiffformat=array
* Fix notice about undefined index in ArrayDiffFormatter
2007-12-01 09:08:02 +00:00
Roan Kattouw
537f7ea5b3 API:
* Adding rvdiffformat parameter to prop=revisions
* Creating formatters for unified (UnifiedDiffFormatter) and array (ArrayDiffFormatter) diffs
2007-11-27 21:36:43 +00:00
Daniel Cannon
1fac7474e4 API: Another diff problem, var name mix-up. 2007-11-27 20:43:29 +00:00
Daniel Cannon
05fec7e664 API: difftoprev fails when 'rvprop=ids' is not specified. Sort of gross way to fix the problem, but it works. 2007-11-27 20:37:26 +00:00
Roan Kattouw
7544b1c497 API: Adding diff generation to prop=revisions.
This implementation outputs normal diff output (with < and >) rather than unified, and always uses native PHP diff (i.e. ignores $wgExternalDiffEngine). An implementation that honors $wgExternalDiffEngine and outputs a unified diff will follow later.
2007-11-27 16:41:13 +00:00
Daniel Cannon
1af0a9f076 API: Ensure it checks *only* the fast limit or the slow limit, not both. On fast revision queries (those without content), was checking once against fast limit and once against slow limit, and exploding if limit exceeded slow limit. 2007-10-05 07:37:58 +00:00
Roan Kattouw
c41d9ddc9f (bug 11534) rvendid doesn't work 2007-10-02 15:30:39 +00:00
Roan Kattouw
50e029c17e API: (bug 11405) Expand templates implementation in the API
Modified patch by Bryan Tongh Minh
2007-09-25 18:36:25 +00:00
Tim Starling
1c708580e2 Fixed typo, fld_len -> fld_size 2007-09-02 14:00:11 +00:00
Yuri Astrakhan
093acd200a API: Added size property (rev_len) 2007-08-09 06:38:48 +00:00
Yuri Astrakhan
ce91d949f7 API:
* Added full text search in titles and content (list=search)
* (bug 10684) Expanded list=allusers functionality
* Possible breaking change: prop=revisions no longer includes pageid for rvprop=ids
* Bug fix: proper search escaping for SQL LIKE queries.
2007-07-30 08:09:15 +00:00
Yuri Astrakhan
8ca133afff API: Big change: Removed all userCanRead() checks per IRC discussion. Only rvprop=content will now check that the page can be read. 2007-07-14 19:04:31 +00:00
Yuri Astrakhan
f0a72f20de API: Reverted back to r23531 for the reasons listed in bug 10297 2007-07-01 06:45:14 +00:00
Roan Kattouw
23040d88f3 Removing a ')' that broke the entire API 2007-06-30 09:31:51 +00:00
Roan Kattouw
eddedab1f4 Adding rvprop=lastid parameter to prop=revisions that lists revid of
previous revision (bug 10297)
2007-06-30 09:23:05 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Yuri Astrakhan
583ac87532 API: Fixed error codes encoding per bug 10308. 2007-06-25 05:44:33 +00:00
Yuri Astrakhan
1152253310 API: Enabled API login throttling (with amidaniel's help)
fixed memcached-client comments
minor queryRevisions fix
2007-05-27 23:50:24 +00:00
Brion Vibber
e9dedd4886 bug 8772: fix for previous patch -- function that takes one parameters was passed two. 2007-05-23 18:32:49 +00:00
Yuri Astrakhan
b4de075600 API:
revisions - removed oldid (not used except in content retrieval), added extra prop options to optimize bandwidth, continue value is now an integer in JSON
 minor help screen improvement.
2007-05-21 06:32:32 +00:00
Yuri Astrakhan
6f6d1f2776 API: recentchanges and usercontribs cleaned up to allow more precise properties selection. Minor security updates. 2007-05-21 04:34:48 +00:00
Yuri Astrakhan
cb38c11c84 API: documentation and cleanup. 2007-05-20 23:31:44 +00:00
Yuri Astrakhan
beb5c4c026 API:
* query=images - error when no valid pages
* log - added proper showing of the patrol events
* revisions - code cleanup
2007-05-20 08:34:47 +00:00
Yuri Astrakhan
aab4c9d205 API:
* breaking change: Converted a map of revisions into a list of revisions to allow easier json processing (no need to know map keys)
* html formatting now properly links urls ending with a '\n' string (jsonfm)
* regression: fixed allpages to return int instead of string for pageid and ns
* Added: info now returns page length, counter, and a new flag
2007-05-19 20:26:08 +00:00
Yuri Astrakhan
fea6038271 * API: Watchlist feed allows 'hours' parameter of how many hours to go back 2007-05-19 18:08:36 +00:00
Yuri Astrakhan
15419ad729 API: resolved bug 8772: Parameter to limit results to revisions made by a particular user, when querying revisions for a page
(patch by Carl Fürstenberg)
2007-05-19 04:13:48 +00:00