CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Listen to a set of hooks to keep track if a pageId was involved in a "page change". More...
Public Member Functions | |
__construct (int $maxStateSize=512) | |
onPageDeleteComplete (ProperPageIdentity $page, Authority $deleter, string $reason, int $pageID, RevisionRecord $deletedRev, ManualLogEntry $logEntry, int $archivedRevisionCount) | |
onPageDelete (ProperPageIdentity $page, Authority $deleter, string $reason, StatusValue $status, bool $suppress) | |
onPageMoveComplete ( $old, $new, $user, $pageid, $redirid, $reason, $revision) | |
onPageSaveComplete ( $wikiPage, $user, $summary, $flags, $revisionRecord, $editResult) | |
isPageChange (int $pageId) | |
Test if this pageId was references in a hook call earlier. | |
Listen to a set of hooks to keep track if a pageId was involved in a "page change".
A page change is a change happening to the page itself, based on the hooks used by EventBus to emit its page_change stream we use this to determine in which stream we might emit a cirrus event based on a LinksUpdateComplete hook. Mainly we want to identify if a particular LinksUpdate is caused by a page change or something else unrelated to the life of the page.
CirrusSearch\PageChangeTracker::isPageChange | ( | int | $pageId | ) |
Test if this pageId was references in a hook call earlier.
Calling this function resets the state held by this class.
int | $pageId |
CirrusSearch\PageChangeTracker::onPageDelete | ( | ProperPageIdentity | $page, |
Authority | $deleter, | ||
string | $reason, | ||
StatusValue | $status, | ||
bool | $suppress ) |
ProperPageIdentity | $page | |
Authority | $deleter | |
string | $reason | |
StatusValue | $status | |
bool | $suppress |
CirrusSearch\PageChangeTracker::onPageDeleteComplete | ( | ProperPageIdentity | $page, |
Authority | $deleter, | ||
string | $reason, | ||
int | $pageID, | ||
RevisionRecord | $deletedRev, | ||
ManualLogEntry | $logEntry, | ||
int | $archivedRevisionCount ) |
ProperPageIdentity | $page | |
Authority | $deleter | |
string | $reason | |
int | $pageID | |
RevisionRecord | $deletedRev | |
ManualLogEntry | $logEntry | |
int | $archivedRevisionCount |
Reimplemented in CirrusSearch\ChangeListener.
CirrusSearch\PageChangeTracker::onPageMoveComplete | ( | $old, | |
$new, | |||
$user, | |||
$pageid, | |||
$redirid, | |||
$reason, | |||
$revision ) |
LinkTarget | $old | Old title |
LinkTarget | $new | New title |
UserIdentity | $user | User who did the move |
int | $pageid | Database ID of the page that's been moved |
int | $redirid | Database ID of the created redirect |
string | $reason | Reason for the move |
RevisionRecord | $revision | RevisionRecord created by the move |
Reimplemented in CirrusSearch\ChangeListener.
CirrusSearch\PageChangeTracker::onPageSaveComplete | ( | $wikiPage, | |
$user, | |||
$summary, | |||
$flags, | |||
$revisionRecord, | |||
$editResult ) |
\WikiPage | $wikiPage | WikiPage modified |
UserIdentity | $user | User performing the modification |
string | $summary | Edit summary/comment |
int | $flags | Flags passed to WikiPage::doUserEditContent() |
RevisionRecord | $revisionRecord | New RevisionRecord of the article |
EditResult | $editResult | Object storing information about the effects of this edit, including which edits were reverted and which edit is this based on (for reverts and null edits). |