Commit graph

13 commits

Author SHA1 Message Date
Tim Starling
377e1084e6 REST: Make getValidatedParams() always return an array
To stop phan from flagging every usage as "suspicious nullable".

Bug: T235355
Change-Id: Ibdcd9f4e9761858e68fae1262187a3e99affa6f9
2019-11-15 04:43:20 +00:00
Petr Pchelko
5b77ce93ad REST: Deduplicate and normalize REST error message names
Bug: T237568
Change-Id: I6f35757f948b34a6a641808db8e5f98983054b7b
2019-11-08 09:37:26 -08:00
Petr Pchelko
84b9efa892 REST: Introduce 'minor' flag in revision response
Bug: T237562
Change-Id: I8460e7affe2579d06ed3523d49692cb89b459e5f
2019-11-07 10:37:07 -08:00
Max Semenik
f1c9cf8879 Minor cleanups
* Identifier case
* Returning a void function result
* Unused variable
* Missing documentation

Change-Id: Ibfd2fc5ae1d91c7c9c6a34bcd4523384d3bca576
2019-11-03 17:10:23 -08:00
Bill Pirkle
402eb6a672 Add "minor" to available REST API history filters
Add "minor" as an allowed filter type in PageHistoryHandler.php,
to retrieve only revisions flagged as minor edits

Bug: T235660
Change-Id: Ia2886e979c5cdb1c742149c23ba90474ae5a0ed1
2019-10-28 10:48:05 -05:00
Petr Pchelko
cb3248934d REST: Correctly quote timestamps for page history handler.
Change-Id: I43cb718ee7a4826e99486e4e888143e2d881a0c5
2019-10-24 08:56:08 -07:00
Petr Pchelko
fa7520ed84 REST: add size and delta to revision metadata endpoint response.
Bug: T231588
Change-Id: Ib35a87d5d9c7c088c62423677163e4b243c92477
2019-10-23 14:12:22 -07:00
jenkins-bot
78a2b8f485 Merge "Fix new phan errors, part 5" 2019-10-20 01:39:44 +00:00
Daimona Eaytoy
d3252fc870 Fix new phan errors, part 5
Some of the errors are suppressed because they're phan false positives.
The idea behind this is that they'll be fixed in a future version of
phan, and we'll just have to remove the suppressions.

Note: I'm disabling UnusedPluginSuppression so that we can start suppressing
issues even if they're still disabled. The sniff should be re-enabled
as soon as we upgrade phan.

Bug: T231636
Change-Id: I0f7fa06a9e03fbb86c7a5eb6e50a850bb258a7f7
2019-10-18 20:45:53 +00:00
Petr Pchelko
a5bf77dc44 REST History and compare endpoints followups.
- Improve access checks for history,compare,revision handlers.
- Ensure that null is not returned in place of empty string

Bug: T235146
Bug: T231588
Bug: T235560
Change-Id: I2a15c7577fe67055367147c4f6b982c9fcdf8535
2019-10-16 15:51:33 -07:00
Petr Pchelko
bea61a1d2e Set unknown/restricted properies to null.
Bug: T235146
Change-Id: I58a0a892461bb7ec799d2a5bd503751bd18152b4
2019-10-10 19:10:40 -07:00
Bill Pirkle
33f42bddb8 Improvements to Core REST API GET page history handler
Fix/improve several issues with the page history handler:
- recognize the logged in user's permissions
- fixes to the "bot" filter query
- fixes to error message construction
- remove extaneous space in response data construction

Bug: T235146
Change-Id: I5364a8a7d7492ab48e1dc84db0880475177dabd3
2019-10-10 14:41:48 -05:00
Bill Pirkle
967988bd3e Core REST API handler for GET page history
Handler to return page history via the Core REST API.
Includes two parameters for pagination:
  older_than
  newer_than
Also includes a "filter" parameter with possible values:
  bot
  anonymous
  reverted

Bug: T231558
Bug: T231597
Change-Id: Ie35d8be6c96b468794f8acf80a5fb50e4cd17c3c
2019-10-09 09:23:54 -05:00