Commit graph

2998 commits

Author SHA1 Message Date
Siebrand Mazeland
aeb358f0c3 Throw exception on invalid RecentChange types
Change-Id: I39279a13a2eb5891991e1c3b4bee0fafe844f1f2
2014-01-02 22:36:47 +00:00
umherirrender
dd4a8a5154 action=feedcontributions no longer has one item more than limit
The extra one is used for navigation on Special:Contributions, but that
is not needed on the rss feed.

Bug: 57874
Change-Id: Id56b0da7e921df9cbdb09e90611d226bf224804d
2013-12-31 17:44:43 +01:00
jenkins-bot
964a1b770f Merge "API: Include variant name in meta=siteinfo" 2013-12-30 17:46:49 +00:00
Brad Jorsch
b5df42903d Fix more concatenation errors
Errors were introduced in I763f79c6 and Id5fd7180.

Change-Id: Ieb5189636eb3df54290aaf998834988c81099eb3
2013-12-29 15:08:46 -05:00
jenkins-bot
2c08a5a4e0 Merge "Update documentation for ApiQueryWatchlist::parseRCType()" 2013-12-29 19:32:31 +00:00
aude
09a0607139 Fix string concatenation in api documentation
Change-Id: I4f94172a5e4ad43dd88c21e01148fd94783aca54
2013-12-29 18:40:14 +01:00
Brad Jorsch
5c620805cc API: Include variant name in meta=siteinfo
For languages with variants, we're already returning the list of variant
codes in meta=siteinfo&siprop=general. Clients may have use for the
variant's human-readable name too, and we can easily add it to the
datastructure.

Change-Id: I6c7ebf43a699a0b2346cb0fdeef6487217992f5c
2013-12-27 16:25:34 -05:00
umherirrender
0ffa78679a Use Title::isWatchable in ApiWatch
Same checks, but same method as in SpecialEditWatchlist

Change-Id: Ic03fc159df9e6322fd0f2d73de4e69b34065d5bb
2013-12-27 19:01:02 +01:00
Siebrand Mazeland
aabbbce707 Update documentation for ApiQueryWatchlist::parseRCType()
Change-Id: I41be0aafd86f49e4b36fa91147dc41ebdeb8779c
2013-12-27 17:06:06 +00:00
Jackmcbarn
d0664545ec Allow searching for IPs' logs
Update limitPerformer to search for IPs based on log_user_text, rather
than preventing any results from being returned. Also, make a
corresponding adjustment to list=logevents in the API, and remove
indexes to match the LogPager code.

Bug: 58691
Bug: 54404
Change-Id: Iae3f4ee5c7fba5b0b0f4f8fb3e67ac054c7b8dd7
2013-12-23 16:41:39 -05:00
btongminh
1f47c9b9ae Fix capitalization in ApiQueryBase::titlePartToKey()
ApiQueryBase::titlePartToKey now allows an extra parameter that
indicates the namespace in order to properly capitalize the title part.

This allows list=allcategories, list=allimages, list=alllinks,
list=allpages, list=deletedrevs and list=filearchive to
handle case-sensitivity properly for all parameters.

Bug: 25702
Change-Id: Iaa5a71ec536f3716f54bc84b39f645545dfd8660
2013-12-23 12:53:43 -05:00
Sean Pringle
a65ccdb1c6 remove forced index causing full index scans
bug 57285

Change-Id: I2a41553c60de53b156fda01faa89af7bdd29d065
2013-12-20 17:19:14 +10:00
Max Semenik
36fd28184a API: allow disabling TOC in action=parse
Change-Id: If9652bbae97ce40c8695affeb28be6088949dfd2
2013-12-18 02:31:17 +04:00
Kunal Mehta
825078d41b Explicitly support user id in action=userrights
Bug: 32493
Change-Id: I2279cde5d0077f8a0612e707a2410693c5e53a12
2013-12-16 19:25:24 +00:00
jenkins-bot
38427bf578 Merge "API: Add iiprop=canonicaltitle" 2013-12-10 21:08:30 +00:00
Brad Jorsch
30306c37e7 API: Add image sizes and default user prefs to meta=siteinfo
Bug: 58217
Change-Id: I33fc64681bc6924324d254b676686f3a6dee2769
2013-12-09 13:08:39 -05:00
Brad Jorsch
7b9b91ead5 API: Add iiprop=canonicaltitle
With recent changes to the filerepo backends, prop=imageinfo will now
return information for the target file when file redirects are queried.
To make this more transparent to clients, add an iiprop to return the
canonical title for the imageinfo data.

Change-Id: I62e368ffe09512f1af6677994f1ccca776b97651
2013-12-09 11:25:52 -05:00
Jackmcbarn
855e3626e3 Show tags on deleted edits through the API
Add support for viewing and filtering by tags in list=deletedrevs in the
API. This code is mostly copied from the prop=revisions code. To avoid
bug #45619 reoccuring here, no index is specified.

Change-Id: I53a1e0479bc6bafe2a1115de875548519e5b3b59
2013-12-04 17:38:24 -05:00
Brad Jorsch
97041a612e Remove change_tag_tag_id index forcing from API too
Change I6b8f35bd removed the forcing of the change_tag_tag_id index in
the UI code paths, but didn't do the same for the API like it probably
should have.

Change-Id: Ie3a00b3a0ad194169a026370510f3e21c3abc079
2013-12-04 12:26:24 -05:00
jenkins-bot
e28c21fe9a Merge "Document future removal of action=parse&prop=languageshtml" 2013-12-03 20:13:03 +00:00
Siebrand Mazeland
13095a6a83 Break long lines and suppress false posive
Change-Id: I14c61d8060cd3a3a2a15193f6721e7f87b783538
2013-12-03 14:31:04 +01:00
jenkins-bot
0791621416 Merge "Fixed api.php fatals due to protected field usage" 2013-12-02 18:58:20 +00:00
mrbluesky
a00cee7cc8 (minor) Make ApiFeedContributions respect $wgFeedLimit
Change-Id: I67e6e30d9fa9b4998de720a2a444c7846003266e
2013-12-02 14:54:31 -04:00
Aaron Schulz
32e4c61397 Fixed api.php fatals due to protected field usage
bug: 57865
Change-Id: Idafdc353c6b0a2fe6657b3887de4b9d6f1eb1dfd
2013-12-02 10:52:10 -08:00
Siebrand Mazeland
b07a2219fb Document future removal of action=parse&prop=languageshtml
Change-Id: I600bbac02633f3b17044602917d062106ae83867
2013-12-02 12:03:01 +01:00
Brad Jorsch
9984a60ab6 API: Add $wgAPIFormatModules
The API currently allows for adding action modules with
$wgAPIModules and query modules with various other $wgAPI*Modules
variables. But there's no way to add a formatting module from an
extension. For parallelism, let's add $wgAPIFormatModules to do just
that.

Bug: 57637
Change-Id: Ia0bd253104a4b5bc56d4fe0dc6736e2129b126f3
2013-11-27 11:40:17 -05:00
umherirrender
0ad48b2ccc Always select ipb_deleted on list=[all]users
When a user with the hideuser permission is using list=[all]users, a
- Notice: Undefined property: stdClass::$ipb_deleted in
\includes\api\ApiQueryUsers.php on line 172
- Notice: Undefined property: stdClass::$ipb_deleted in
\includes\api\ApiQueryAllUsers.php on line 238
can be raised, because the join on the ipblocks table was not done for
the user.

Change-Id: I25ead34b7905e99c249cb05c9d4940195c8b6263
2013-11-22 20:30:58 +01:00
jenkins-bot
b95857b90c Merge "Remove unneeded uses of else{} in api/" 2013-11-20 21:34:21 +00:00
jenkins-bot
2e626ce500 Merge "Fixed spacing" 2013-11-19 21:50:44 +00:00
jenkins-bot
a7c5e94000 Merge "API: Add default setting for OpenSearch limit parameter" 2013-11-19 19:01:58 +00:00
Alex Ivanov
3615dbda36 API: Add default setting for OpenSearch limit parameter
This is done as part of a GCI 2013 task.

Bug: 30089
Change-Id: I4c1a850520976a5b8b433feee4807c5f6960e3ac
2013-11-19 19:55:04 +01:00
umherirrender
f153998317 Fixed spacing
- Removed double spaces
- Added space after if/switch/foreach
- Removed space on elseif
- Added space around parentheses
- Added newline at end of file
- Removed space before semicolon at end of line

Change-Id: Id40b87e04786c6111e6686d7f7eea1e588bdf37d
2013-11-19 19:03:54 +01:00
Siebrand Mazeland
ca209473d1 Remove unneeded uses of else{} in api/
Fixed a little documentation issue, removed a line of unreachable code
and fixed up two formatting issues in the process.

Change-Id: If29391ee1a0daf19973437f36c3216b8716debd0
2013-11-18 21:34:43 +01:00
Siebrand Mazeland
470d0c8c5d Format email addresses more consistently
Change-Id: I1dbced804ff1e0bf8e162570c17cc537d318872f
2013-11-18 21:17:55 +01:00
jenkins-bot
ffcf5b9d0f Merge "Remove unused local variables" 2013-11-18 18:37:37 +00:00
jenkins-bot
0fe5700a8a Merge "Address errors and warnings in CodeSniffer in api/" 2013-11-18 18:28:22 +00:00
jenkins-bot
e35135cc47 Merge "Update indentation" 2013-11-18 18:24:27 +00:00
jenkins-bot
d322c8aa08 Merge "Address CodeSniffer comments in ApiBase.php" 2013-11-18 18:22:25 +00:00
Timo Tijhof
65904ba1bb Add show=unpatrolled to the recentchanges API
Adding it only in the API because SpecialRecentChanges only shows
"Hide patrolled edits" option if rcpatrol is enabled.

show=!patrolled returns results that include changes that can't
be patrolled which technically correct (they aren't correct)
but probably not what you're looking for when looking for
unpatrolled changes.

Change-Id: I356a8625c7126b90aa7e7a23efe3bef7d448b502
2013-11-18 10:33:32 +05:30
Siebrand Mazeland
4c3bc3f865 Add/update/remove incomplete/incorrect documentation
Change-Id: I3c2c7f61d9a579ad794ce7b564ccc8a7cfb9b6fc
2013-11-17 21:53:34 +00:00
Siebrand Mazeland
f8f3ddea50 Update docs to reduce inconsistent type compatibility in api/
Change-Id: Iaf97aeb514ddb2176491c3820fe891be8e989939
2013-11-17 21:47:51 +00:00
Siebrand Mazeland
6f9c0c551f Update indentation in ApiUserrights::execute()
The previous formatting was inconsistent.

Change-Id: I22d7cba00cd39df7069b47f78ca130e3e031ceb4
2013-11-17 20:13:55 +00:00
Siebrand Mazeland
d9b3e2ee67 Simplify ApiUserRights::getUrUser()
Remove unneeded else and local variable assignment.

Change-Id: I166d811b220e925be11da5c49b6fe55f0d8e71c8
2013-11-17 19:46:18 +00:00
Siebrand Mazeland
54dd80cc2f Update documentation for ApiDelete::deleteFile()
WikiPage was no longer valid given the current type hint. Added
types and documentation where missing.

Change-Id: Ie0a3a8fff3ad496b723958133867df48a695d3b7
2013-11-17 19:46:01 +00:00
Siebrand Mazeland
5e3fab3930 Fix inconsistent line break
Change-Id: I42098f3bdbf470bd9de1d29ad64005dfd6f7e134
2013-11-17 18:37:00 +00:00
Siebrand Mazeland
041728e24b Remove unused local variables
Change-Id: I4162d45e68d65347108f94b3d80bc146f3393c1b
2013-11-17 16:54:19 +01: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
593fb308f6 Update indentation
Change-Id: Id0ff1d21362aa8984529ecde39304c7aedf589c1
2013-11-17 15:44:39 +00:00
Siebrand Mazeland
6807426b2e Address CodeSniffer comments in ApiBase.php
Change-Id: Ifd8567dcccf51a16f0dc7459a3bbe9e21e928d91
2013-11-17 16:38:44 +01:00
jenkins-bot
2a0da3b558 Merge "Fix incorrect parameter order for dieUsage()" 2013-11-16 22:58:18 +00:00