Merge "Special:Upload should not crash on failing previews"
[mediawiki.git] / includes / WatchedItemQueryServiceExtension.php
blob8fcf1311dfd6a73e0ed75debc021d85bb0e94e2d
1 <?php
3 /**
4 * Extension mechanism for WatchedItemQueryService
6 * @since 1.29
8 * @file
9 * @ingroup Watchlist
11 * @license GNU GPL v2+
13 interface WatchedItemQueryServiceExtension {
15 /**
16 * Modify the WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
17 * query before it's made.
19 * @warning Any joins added *must* join on a unique key of the target table
20 * unless you really know what you're doing.
21 * @param User $user
22 * @param array $options Options from
23 * WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
24 * @param IDatabase $db Database connection being used for the query
25 * @param array &$tables Tables for Database::select()
26 * @param array &$fields Fields for Database::select()
27 * @param array &$conds Conditions for Database::select()
28 * @param array &$dbOptions Options for Database::select()
29 * @param array &$joinConds Join conditions for Database::select()
31 public function modifyWatchedItemsWithRCInfoQuery( User $user, array $options, IDatabase $db,
32 array &$tables, array &$fields, array &$conds, array &$dbOptions, array &$joinConds
35 /**
36 * Modify the results from WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
37 * before they're returned.
39 * @param User $user
40 * @param array $options Options from
41 * WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
42 * @param IDatabase $db Database connection being used for the query
43 * @param array &$items array of pairs ( WatchedItem $watchedItem, string[] $recentChangeInfo ).
44 * May be truncated if necessary, in which case $startFrom must be updated.
45 * @param ResultWrapper|bool $res Database query result
46 * @param array|null &$startFrom Continuation value. If you truncate $items, set this to
47 * [ $recentChangeInfo['rc_timestamp'], $recentChangeInfo['rc_id'] ] from the first item
48 * removed.
50 public function modifyWatchedItemsWithRCInfo( User $user, array $options, IDatabase $db,
51 array &$items, $res, &$startFrom