Refactor database-related code in ApiQueryWatchlistRaw
authorLeszek Manicki <leszek.manicki@wikimedia.de>
Fri, 17 Jun 2016 11:11:05 +0000 (13:11 +0200)
committerAddshore <addshorewiki@gmail.com>
Wed, 6 Jul 2016 12:57:39 +0000 (12:57 +0000)
commitc1b4b19de384d4e28f1dbdcc0fd59212a6742618
tree30aaa792f1be98a43301ed162f91550e40dddde6
parentfe922d470fbddff5617448e0d90df3e18c04644e
Refactor database-related code in ApiQueryWatchlistRaw

Database queries used to get user's watchlist items in API are quite
complex due to number of options oferred by the API.
Generating the query is moved to WatchedItemQueryService.
ApiQueryWatchlistRaw no longer contains database-related code.

Simple user watchlist item lookups should use WatchedItemStore.

ApiQueryWatchlistRaw tests have been introduced in
I9c07aa237607143985f0efe20ed0065d2bde27e4

Bug: T132566
Change-Id: I875a92074b52c00ac11db1fa05615abbf5262ab1
includes/WatchedItemQueryService.php
includes/api/ApiQueryWatchlistRaw.php
tests/phpunit/includes/WatchedItemQueryServiceUnitTest.php
tests/phpunit/includes/api/ApiQueryWatchlistRawIntegrationTest.php