MediaWiki REL1_35
|
Public Member Functions | |
__construct (ILoadBalancer $loadBalancer, CommentStore $commentStore, ActorMigration $actorMigration, WatchedItemStoreInterface $watchedItemStore, PermissionManager $permissionManager, HookContainer $hookContainer, bool $expiryEnabled=false, int $maxQueryExecutionTime=0) | |
getWatchedItemsForUser (UserIdentity $user, array $options=[]) | |
For simple listing of user's watchlist items, see WatchedItemStore::getWatchedItemsForUser. | |
getWatchedItemsWithRecentChangeInfo (User $user, array $options=[], &$startFrom=null) | |
Public Attributes | |
const | DIR_NEWER = 'newer' |
const | DIR_OLDER = 'older' |
const | FILTER_ANON = 'anon' |
const | FILTER_AUTOPATROLLED = 'autopatrolled' |
const | FILTER_BOT = 'bot' |
const | FILTER_CHANGED = 'changed' |
const | FILTER_MINOR = 'minor' |
const | FILTER_NOT_ANON = '!anon' |
const | FILTER_NOT_AUTOPATROLLED = '!autopatrolled' |
const | FILTER_NOT_BOT = '!bot' |
const | FILTER_NOT_CHANGED = '!changed' |
const | FILTER_NOT_MINOR = '!minor' |
const | FILTER_NOT_PATROLLED = '!patrolled' |
const | FILTER_NOT_UNREAD = '!unread' |
const | FILTER_PATROLLED = 'patrolled' |
const | FILTER_UNREAD = 'unread' |
const | INCLUDE_AUTOPATROL_INFO = 'autopatrol' |
const | INCLUDE_COMMENT = 'comment' |
const | INCLUDE_FLAGS = 'flags' |
const | INCLUDE_LOG_INFO = 'loginfo' |
const | INCLUDE_PATROL_INFO = 'patrol' |
const | INCLUDE_SIZES = 'sizes' |
const | INCLUDE_TAGS = 'tags' |
const | INCLUDE_USER = 'user' |
const | INCLUDE_USER_ID = 'userid' |
const | SORT_ASC = 'ASC' |
const | SORT_DESC = 'DESC' |
Private Attributes | |
ActorMigration | $actorMigration |
CommentStore | $commentStore |
bool | $expiryEnabled |
Correlates to $wgWatchlistExpiry feature flag. | |
WatchedItemQueryServiceExtension[] null | $extensions = null |
HookRunner | $hookRunner |
ILoadBalancer | $loadBalancer |
int | $maxQueryExecutionTime |
Max query execution time. | |
PermissionManager | $permissionManager |
WatchedItemStoreInterface | $watchedItemStore |
Definition at line 23 of file WatchedItemQueryService.php.
WatchedItemQueryService::__construct | ( | ILoadBalancer | $loadBalancer, |
CommentStore | $commentStore, | ||
ActorMigration | $actorMigration, | ||
WatchedItemStoreInterface | $watchedItemStore, | ||
PermissionManager | $permissionManager, | ||
HookContainer | $hookContainer, | ||
bool | $expiryEnabled = false , |
||
int | $maxQueryExecutionTime = 0 |
||
) |
Definition at line 92 of file WatchedItemQueryService.php.
|
private |
Definition at line 126 of file WatchedItemQueryService.php.
References DB_REPLICA.
Referenced by getWatchedItemsForUser(), and getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 115 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 635 of file WatchedItemQueryService.php.
References Wikimedia\Rdbms\IDatabase\bitAnd(), LogPage\DELETED_ACTION, LogPage\DELETED_RESTRICTED, LIST_OR, Wikimedia\Rdbms\IDatabase\makeList(), and RC_LOG.
Referenced by getWatchedItemsWithRCInfoQueryConds().
|
private |
Creates a query condition part for getting only items before or after the given link target (while ordering using $sort mode)
IDatabase | $db | |
LinkTarget | $target | |
string | $op | comparison operator to use in the conditions |
Definition at line 716 of file WatchedItemQueryService.php.
References Wikimedia\Rdbms\IDatabase\addQuotes(), MediaWiki\Linker\LinkTarget\getDBkey(), MediaWiki\Linker\LinkTarget\getNamespace(), LIST_AND, LIST_OR, and Wikimedia\Rdbms\IDatabase\makeList().
Referenced by getWatchedItemsForUserQueryConds().
|
private |
Definition at line 373 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 583 of file WatchedItemQueryService.php.
References Wikimedia\Rdbms\IDatabase\addQuotes(), and Wikimedia\Rdbms\IDatabase\timestamp().
Referenced by getWatchedItemsWithRCInfoQueryConds().
|
private |
Definition at line 655 of file WatchedItemQueryService.php.
References Wikimedia\Rdbms\IDatabase\addQuotes(), LIST_AND, LIST_OR, Wikimedia\Rdbms\IDatabase\makeList(), and Wikimedia\Rdbms\IDatabase\timestamp().
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 604 of file WatchedItemQueryService.php.
References Wikimedia\Rdbms\IDatabase\bitAnd(), and User\newFromName().
Referenced by getWatchedItemsWithRCInfoQueryConds().
WatchedItemQueryService::getWatchedItemsForUser | ( | UserIdentity | $user, |
array | $options = [] |
||
) |
For simple listing of user's watchlist items, see WatchedItemStore::getWatchedItemsForUser.
UserIdentity | $user | |
array | $options | Allowed keys: 'sort' => string optional sorting by namespace ID and title one of the self::SORT_* constants 'namespaceIds' => int[] optional namespace IDs to filter by (defaults to all namespaces) 'limit' => int maximum number of items to return 'filter' => string optional filter, one of the self::FILTER_* contants 'from' => LinkTarget requires 'sort' key, only return items starting from those related to the link target 'until' => LinkTarget requires 'sort' key, only return items until those related to the link target 'startFrom' => LinkTarget requires 'sort' key, only return items starting from those related to the link target, allows to skip some link targets specified using the form option |
Definition at line 304 of file WatchedItemQueryService.php.
References $res, getConnection(), getWatchedItemsForUserQueryConds(), getWatchedItemsForUserQueryDbOptions(), and MediaWiki\User\UserIdentity\isRegistered().
|
private |
Definition at line 675 of file WatchedItemQueryService.php.
References getFromUntilTargetConds(), and MediaWiki\User\UserIdentity\getId().
Referenced by getWatchedItemsForUser().
|
private |
Definition at line 749 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsForUser().
|
private |
Definition at line 468 of file WatchedItemQueryService.php.
References Wikimedia\Rdbms\IDatabase\addQuotes(), getExtraDeletedPageLogEntryRelatedCond(), getStartEndConds(), Wikimedia\Rdbms\IDatabase\getType(), getUserRelatedConds(), getWatchedItemsWithRCInfoQueryFilterConds(), getWatchlistOwnerId(), LIST_OR, Wikimedia\Rdbms\IDatabase\makeList(), RC_LOG, and Wikimedia\Rdbms\IDatabase\timestamp().
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 732 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 410 of file WatchedItemQueryService.php.
References ChangeTags\makeTagSummarySubquery().
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 532 of file WatchedItemQueryService.php.
References User\useNPPatrol(), and User\useRCPatrol().
Referenced by getWatchedItemsWithRCInfoQueryConds().
|
private |
Definition at line 769 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsWithRecentChangeInfo().
|
private |
Definition at line 386 of file WatchedItemQueryService.php.
Referenced by getWatchedItemsWithRecentChangeInfo().
WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo | ( | User | $user, |
array | $options = [] , |
||
& | $startFrom = null |
||
) |
User | $user | |
array | $options | Allowed keys: 'includeFields' => string[] RecentChange fields to be included in the result, self::INCLUDE_* constants should be used 'filters' => string[] optional filters to narrow down resulted items 'namespaceIds' => int[] optional namespace IDs to filter by (defaults to all namespaces) 'allRevisions' => bool return multiple revisions of the same page if true, only the most recent if false (default) 'rcTypes' => int[] which types of RecentChanges to include (defaults to all types), allowed values: RC_EDIT, RC_NEW, RC_LOG, RC_EXTERNAL, RC_CATEGORIZE 'onlyByUser' => string only list changes by a specified user 'notByUser' => string do not incluide changes by a specified user 'dir' => string in which direction to enumerate, accepted values:
|
array | null | &$startFrom | Continuation value: [ string $rcTimestamp, int $rcId ] |
Definition at line 173 of file WatchedItemQueryService.php.
References $res, getConnection(), getExtensions(), getRecentChangeFieldsFromRow(), getStartFromConds(), getWatchedItemsWithRCInfoQueryConds(), getWatchedItemsWithRCInfoQueryDbOptions(), getWatchedItemsWithRCInfoQueryFields(), getWatchedItemsWithRCInfoQueryJoinConds(), getWatchedItemsWithRCInfoQueryTables(), RC_CATEGORIZE, RC_EDIT, RC_EXTERNAL, RC_LOG, and RC_NEW.
|
private |
Definition at line 517 of file WatchedItemQueryService.php.
References MediaWiki\User\UserIdentity\getId().
Referenced by getWatchedItemsWithRCInfoQueryConds().
|
private |
Definition at line 71 of file WatchedItemQueryService.php.
|
private |
Definition at line 68 of file WatchedItemQueryService.php.
|
private |
Correlates to $wgWatchlistExpiry feature flag.
Definition at line 85 of file WatchedItemQueryService.php.
|
private |
Definition at line 65 of file WatchedItemQueryService.php.
|
private |
Definition at line 80 of file WatchedItemQueryService.php.
|
private |
Definition at line 62 of file WatchedItemQueryService.php.
|
private |
Max query execution time.
Definition at line 90 of file WatchedItemQueryService.php.
|
private |
Definition at line 77 of file WatchedItemQueryService.php.
|
private |
Definition at line 74 of file WatchedItemQueryService.php.
const WatchedItemQueryService::DIR_NEWER = 'newer' |
Definition at line 26 of file WatchedItemQueryService.php.
const WatchedItemQueryService::DIR_OLDER = 'older' |
Definition at line 25 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_ANON = 'anon' |
Definition at line 45 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_AUTOPATROLLED = 'autopatrolled' |
Definition at line 49 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_BOT = 'bot' |
Definition at line 43 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_CHANGED = 'changed' |
Definition at line 53 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_MINOR = 'minor' |
Definition at line 41 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_NOT_ANON = '!anon' |
Definition at line 46 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_NOT_AUTOPATROLLED = '!autopatrolled' |
Definition at line 50 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_NOT_BOT = '!bot' |
Definition at line 44 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_NOT_CHANGED = '!changed' |
Definition at line 54 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_NOT_MINOR = '!minor' |
Definition at line 42 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_NOT_PATROLLED = '!patrolled' |
Definition at line 48 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_NOT_UNREAD = '!unread' |
Definition at line 52 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_PATROLLED = 'patrolled' |
Definition at line 47 of file WatchedItemQueryService.php.
const WatchedItemQueryService::FILTER_UNREAD = 'unread' |
Definition at line 51 of file WatchedItemQueryService.php.
const WatchedItemQueryService::INCLUDE_AUTOPATROL_INFO = 'autopatrol' |
Definition at line 33 of file WatchedItemQueryService.php.
const WatchedItemQueryService::INCLUDE_COMMENT = 'comment' |
Definition at line 31 of file WatchedItemQueryService.php.
const WatchedItemQueryService::INCLUDE_FLAGS = 'flags' |
Definition at line 28 of file WatchedItemQueryService.php.
const WatchedItemQueryService::INCLUDE_LOG_INFO = 'loginfo' |
Definition at line 35 of file WatchedItemQueryService.php.
const WatchedItemQueryService::INCLUDE_PATROL_INFO = 'patrol' |
Definition at line 32 of file WatchedItemQueryService.php.
const WatchedItemQueryService::INCLUDE_SIZES = 'sizes' |
Definition at line 34 of file WatchedItemQueryService.php.
const WatchedItemQueryService::INCLUDE_TAGS = 'tags' |
Definition at line 36 of file WatchedItemQueryService.php.
const WatchedItemQueryService::INCLUDE_USER = 'user' |
Definition at line 29 of file WatchedItemQueryService.php.
const WatchedItemQueryService::INCLUDE_USER_ID = 'userid' |
Definition at line 30 of file WatchedItemQueryService.php.
const WatchedItemQueryService::SORT_ASC = 'ASC' |
Definition at line 56 of file WatchedItemQueryService.php.
const WatchedItemQueryService::SORT_DESC = 'DESC' |
Definition at line 57 of file WatchedItemQueryService.php.