Commit graph

73 commits

Author SHA1 Message Date
Reedy
e48ecbc524 Switch API to use Config classes
Only done where globals are config (so not $wgParser, $wgContLang etc)

Change-Id: Ic39cdd858cfb9096a2bc09618f97e64270d76f13
2014-06-15 23:56:38 +01:00
robin
f930d0c5a2 Always link to diff in watchlist feed
Remove option to link to diffs in watchlist feed instead of the page itself, which was disabled by default.
This makes it consistent with the contributions feed when Change-Id: Ie33e2ba90e7a7566d0e0925220b8fd12b1928513 is merged.
For these changes feeds it makes sense to always link to the actual diffs.

See also bug 10268.

Change-Id: I0917844219be773ce24b4c6bac9b7d0d5a4b922d
2014-05-10 16:01:12 +00:00
umherirrender
e63299d208 Fixed some @params documentation (includes/api)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: I758fa4ad80ac95e2ddd3770bcb9b7d2e57ec34ea
2014-04-18 13:55:36 +00:00
addshore
719d7a2f03 Add final period to API module descriptions
Change-Id: Icae68c1ab1fd0006e00a3a9a56ae8f831d3d0d45
2014-03-10 09:04:08 +00:00
Siebrand Mazeland
d026e1a403 Address errors and warnings in CodeSniffer in api/
Change-Id: I06de371393d50eada33154626874b106d814642b
2013-11-17 16:52:24 +01:00
Siebrand Mazeland
fe05f85a62 Update formatting on API classes
Change-Id: Ifd18a8de1d2580b723a5b91e8d202818fd97795a
2013-11-14 17:03:20 +00:00
MatmaRex
0b7ecb1a64 Correctly use $wgFeedLimit in page history feed
The previous behavior enforced a minimal maximum of 10, even if
$wgFeedLimit was set to a lower value.

Also grepped everything for $wgFeedLimit and fixed all other
error-prone (but correct) uses.

Bug: 50886
Change-Id: Ia81bbadfcf4270b0f932b543265ca37f364530f3
2013-07-07 20:39:53 +02:00
kaligula
d797477d7b (bug 47219) Allow specifying change type of Wikipedia feed items
It exposes field /rc_type/ as ApiQueryRecentChanges does thus allowing
user to define which (edit, external, new, log) changes to show in feed.

Bug: 47219
Change-Id: If22827129b04d423711f921307dc820d4840d9d1
2013-04-30 18:52:56 +02:00
umherirrender
a35cce4be0 Fixed spacing in api folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: Id7779dca4d1185245cf5764102b8de8b232c34b6
2013-04-20 07:47:36 +00:00
kaligula
0d086f32df Support for linking directly to sections in ApiFeedWatchlist.
It works only if a section name is present in item's comment.

Change-Id: I2547c10b01fab2f835fce856f6213386f309f0af
2013-04-09 20:16:08 +02:00
kaligula
8d99c00d2e (bug 25325) fix hiding bot edits
I added support for 'wlshow' parameter, which allows user
to decide if to include or exclude bot/minor/anon/patrolled
edits from feed watchlist.

Plus: I bound the params checkup and params' descriptions with
ApiQueryWatchlist (Yurik's suggestions).

Change-Id: Idab489fc017dcf226ea39f2f1766e06064e4ec0a
2013-03-24 01:32:58 +01:00
MatmaRex
8a539b8e9a (bug 25325) fix wlexcludeuser for ApiFeedWatchlist
The effect of setting this option was later overwritten in the code; I
just moved an if a few lines down.

Also some null comparison cleanup.

Change-Id: I2a85673330681c6ff7facc25a7bbfb6972fe8fd5
2013-03-10 22:23:36 +01:00
Antoine Musso
b2fba3f27f api: remove duplicate __contruct calls
For historical reasons, all our API class had a dummy __construct which
simply calls their parent constructor.  This patch removes all such
occurences to save out some bytes.

Change-Id: I667955d7821f780fc5ce23823d74dedb1729b9fa
2013-01-29 09:38:17 +01:00
Yuri Astrakhan
503cd2f4ae (bug 35885) remove api version string and parameter
API was using SVN's version keyword which GIT does not support.
All related methods were either removed, or for those that
could have been used from extensions, emptied out.
api.php?version now shows unrecognized param warning.

Change-Id: I910ca1448ed2ed697ac19b17c486d130aa1d7e03
2013-01-18 12:41:18 -05:00
Yuri Astrakhan
32fd68f81c Minor cleanup
Fixed spacing, eol chars, "string" --> 'string'

Change-Id: I630247c6c5b469efb67ec9de32e8533ae88e59fb
2013-01-12 01:50:48 -05:00
Alex Monk
2fabea7eea Use wfMessage instead of deprecated wfMsg*
Or $this->msg in special pages.

Change-Id: I774a89d646615053c8424050e42ad95601f92543
2012-08-18 14:11:05 +02:00
Antoine Musso
4f5d2386f3 escape HTML elements in docblock with double quotes
Doxygen choke on text enclosed by '<' and '>' since it tries to
interpret them as HTML or XML elements. This patch adds double quotes
in includes/api/*.php files around the two following strings:

 <Firstname>.<Lastname>@gmail.com
 <Firstname><Lastname>@gmail.com

Which becomes:

 "<Firstname>.<Lastname>@gmail.com"
 "<Firstname><Lastname>@gmail.com"

Tested locally, it prevents doxygen 1.8.0 related warnings.

Change-Id: I36d82eb3fd4989ee3ffc65b0b527b83711d1ba69
2012-07-15 22:15:45 +02:00
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
Sam Reed
586aeca9cf Add Platonides' "add wlexcludeuser to feedwatchlist" patch from bug 25325 2011-11-14 14:36:06 +00:00
Sam Reed
fa65fa3243 Documentation
Deprecated code updates
2011-10-27 00:46:17 +00:00
Sam Reed
09ae0b67ca Followup r85756
Update code to use boolean, as it's not going to be null
2011-10-13 16:40:22 +00:00
Sam Reed
469cc76775 Return documentation 2011-09-21 16:36:43 +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
f8b95820ed Followup r89562, use 'feedformat' not 'feed' 2011-06-13 21:35:23 +00:00
Sam Reed
2dbd385359 Minor refactoring
Comment updates
2011-06-06 15:01:27 +00:00
Sam Reed
59c87066fb Make ApiFeedWatchlist obey $wgFeed, and also die with an error if an invalid feed formatter is given 2011-06-06 14:06:37 +00:00
Max Semenik
220279a352 Rm all mentions of "this module" in API action descriptions. They are supposed to be read by API users, not MW coders, thus internal terminology shouldn't be used here. 2011-04-25 14:05:57 +00:00
Sam Reed
09ea8906a2 * (bug 28368) add hint for multipart/form-data to api information of action=import&xml=
Add RELEASE-NOTES for r85585 too
2011-04-10 12:15:03 +00:00
Sam Reed
1f05665cf3 Styleli[zs]e the API up to date (Been a while since) 2010-12-30 17:06:09 +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
5609bcfed0 Fix indentation of => added in r77366 to be in step with the rest 2010-12-03 19:47:22 +00:00
Roan Kattouw
e6c697e43f and -> && in r77366 2010-12-03 19:32:25 +00:00
Bryan Tong Minh
13bebec50e (bug 10268) Added linktodiffs parameter on action=feedwatchlist 2010-11-27 19:24:48 +00:00
Roan Kattouw
3adc35f790 Fix r72905: don't run $endTime through wfTimestamp() twice 2010-10-16 16:53:10 +00:00
Roan Kattouw
97fa1e5c5b (bug 25137) Don't open a DB connection just to (wrongly) use $dbr->timestamp() 2010-09-13 15:14:11 +00:00
Platonides
537826a674 Remove $wgContLanguageCode usage in core.
sed -i 's/$wgContLanguageCode/$wgLanguageCode/g'
These are now the same, always. Per and since r15827.

$wgLanguageCode wins due to being the one set by LocalSettings.

$wgContLanguageCode definition at includes/Setup.php kept for now.
2010-09-07 22:37:55 +00:00
Alexandre Emsenhuber
457eb73b61 Standardised file description headers, added @file 2010-08-07 19:59:42 +00:00
Roan Kattouw
5de5086351 Apply r69357 to trunk; was a fix for trunk but got committed to REL1_16 2010-07-15 09:25:58 +00:00
Mark A. Hershberger
e28aaea397 follow up r69339:
* Add a missing setVaryCookie for consistency
* don't cache result when token is given in ApiFeedWatchlist
2010-07-14 21:46:52 +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
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
Jack Phoenix
604906deb5 API: coding style cleanup, fix copyright symbol, more braces 2010-02-23 12:30:23 +00:00
Sam Reed
59e656c23b Stylize on Api
Manual layout improvements in ApiFeedWatchlist
2010-02-19 01:25:57 +00:00
Sam Reed
2081a0693f Rest of dieUsageMsg in getPossibleErrors 2010-02-13 00:28:27 +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
Aryeh Gregor
30486c975c Don't overload wluser parameter, use new wlowner
Fix for r53703 based on code review by Roan.  Also improved error
message and sample documentation slightly.
2009-07-26 17:04:22 +00:00
Aryeh Gregor
7b66b14738 Add opt-in RSS feed for watchlist
Authentication is via a token entered in preferences, if not blank.  If
you set a token in your preferences, the following sort of link will
generate the RSS feed:

api.php?action=feedwatchlist&list=watchlist&wluser=Simetrical&wltoken=91c1ef18279f9c24ccf67a79e899ae4d2a3201bc

I haven't actually added the <link> tag to Special:Watchlist, since I've
done enough coding for one night.  Someone else can feel free to do
that (otherwise people might get kind of confused :) ).

An auto-generated random token is suggested to the user on the pref page
so that they don't have to be too creative.  Pref help text is rather
underemphasized in the default style, though.

It would be worth considering making this opt-out instead of opt-in,
but that would require some voodoo magic to get the default prefs to
work right (since we'd need a different value for each user).  We might
set the default to some function of user id + secret site-specific value
to avoid having to store the values in the database.

Since the feature is implemented via the API, it only works if the API
is enabled.  Some API people might want to review my code for sanity.

Bug: 471
2009-07-24 01:22:06 +00:00
Roan Kattouw
84624f39b5 Fix E_WARNING reported by siebrand 2009-02-05 15:31:06 +00:00