|
MediaWiki master
|
Inherits MediaWiki\RecentChanges\RecentChangeFactory, and MediaWiki\RecentChanges\RecentChangeLookup.

Public Member Functions | |||||||||||||||||||||||||||||||||||||||||||||||||
| __construct (ActorStoreFactory $actorStoreFactory, ChangeTagsStore $changeTagsStore, IConnectionProvider $connectionProvider, CommentStore $commentStore, HookContainer $hookContainer, JobQueueGroup $jobQueueGroup, PermissionManager $permissionManager, RecentChangeRCFeedNotifier $recentChangeRCFeedNotifier, ServiceOptions $options, TitleFormatter $titleFormatter, WikiPageFactory $wikiPageFactory, UserFactory $userFactory, ?array $extensionSources) | |||||||||||||||||||||||||||||||||||||||||||||||||
| addSourceForTest ( $name, $info) | |||||||||||||||||||||||||||||||||||||||||||||||||
| Register an rc_source value. | |||||||||||||||||||||||||||||||||||||||||||||||||
| convertSourceToType (string $source) | |||||||||||||||||||||||||||||||||||||||||||||||||
Convert an rc_source value to a legacy type string.
| |||||||||||||||||||||||||||||||||||||||||||||||||
| convertTypeToSources ( $type) | |||||||||||||||||||||||||||||||||||||||||||||||||
Convert a legacy type string, as used by the API, or an array of such strings, to an array of rc_source values.
| |||||||||||||||||||||||||||||||||||||||||||||||||
| createCategorizationRecentChange (string $timestamp, PageIdentity $categoryTitle, ?UserIdentity $user, string $comment, PageIdentity $pageTitle, int $oldRevId, int $newRevId, bool $bot, string $ip='', int $deleted=0, ?bool $added=null, bool $forImport=false) | |||||||||||||||||||||||||||||||||||||||||||||||||
Create a RecentChange for a category membership change.
| |||||||||||||||||||||||||||||||||||||||||||||||||
| createEditRecentChange (string $timestamp, PageIdentity $page, bool $minor, UserIdentity $user, string $comment, int $oldId, bool $bot, string $ip='', ?int $oldSize=0, ?int $newSize=0, int $newId=0, int $patrol=0, array $tags=[], ?EditResult $editResult=null) | |||||||||||||||||||||||||||||||||||||||||||||||||
Create a RecentChange for an edit.
| |||||||||||||||||||||||||||||||||||||||||||||||||
| createLogRecentChange (string $timestamp, PageReference $logPage, UserIdentity $user, string $actionComment, string $ip, string $type, string $action, PageReference $target, string $logComment, string $params, int $newId=0, string $actionCommentIRC='', int $revId=0, bool $isPatrollable=false, ?bool $forceBotFlag=null, int $deleted=0) | |||||||||||||||||||||||||||||||||||||||||||||||||
Create a RecentChange for a log entry.
| |||||||||||||||||||||||||||||||||||||||||||||||||
| createNewPageRecentChange (string $timestamp, PageIdentity $page, bool $minor, UserIdentity $user, string $comment, bool $bot, string $ip='', ?int $size=0, int $newId=0, int $patrol=0, array $tags=[]) | |||||||||||||||||||||||||||||||||||||||||||||||||
Create a RecentChange for a new page.
| |||||||||||||||||||||||||||||||||||||||||||||||||
| getAllSources () | |||||||||||||||||||||||||||||||||||||||||||||||||
| Get all known rc_source values. | |||||||||||||||||||||||||||||||||||||||||||||||||
| getPrimarySources () | |||||||||||||||||||||||||||||||||||||||||||||||||
| Get the rc_source values for events that are not replicated from elsewhere. | |||||||||||||||||||||||||||||||||||||||||||||||||
| getRecentChangeByConds (array $conds, string $fname=__METHOD__, bool $fromPrimary=false) | |||||||||||||||||||||||||||||||||||||||||||||||||
Get the first recent change matching some specific conditions.
| |||||||||||||||||||||||||||||||||||||||||||||||||
| getRecentChangeById (int $rcid) | |||||||||||||||||||||||||||||||||||||||||||||||||
Get a recent change by its ID.
| |||||||||||||||||||||||||||||||||||||||||||||||||
| insertRecentChange (RecentChange $recentChange, bool $send=self::SEND_FEED) | |||||||||||||||||||||||||||||||||||||||||||||||||
Insert a recent change into the database.For compatibility reasons, the SEND_ constants internally reference a value that may seem negated from their purpose (none=true, feed=false). This is because the parameter used to be called "$noudp", defaulting to false.
| |||||||||||||||||||||||||||||||||||||||||||||||||
| isFromPrimarySource (RecentChange $rc) | |||||||||||||||||||||||||||||||||||||||||||||||||
| Check if a recent change is from a primary source. | |||||||||||||||||||||||||||||||||||||||||||||||||
| newRecentChangeFromRow ( $row) | |||||||||||||||||||||||||||||||||||||||||||||||||
Create a new RecentChange object from a database row.
| |||||||||||||||||||||||||||||||||||||||||||||||||
Static Public Member Functions | |
| static | isEnotifEnabled (ServiceOptions $options) |
| Whether e-mail notifications are generally enabled on this wiki. | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
Definition at line 37 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::__construct | ( | ActorStoreFactory | $actorStoreFactory, |
| ChangeTagsStore | $changeTagsStore, | ||
| IConnectionProvider | $connectionProvider, | ||
| CommentStore | $commentStore, | ||
| HookContainer | $hookContainer, | ||
| JobQueueGroup | $jobQueueGroup, | ||
| PermissionManager | $permissionManager, | ||
| RecentChangeRCFeedNotifier | $recentChangeRCFeedNotifier, | ||
| ServiceOptions | $options, | ||
| TitleFormatter | $titleFormatter, | ||
| WikiPageFactory | $wikiPageFactory, | ||
| UserFactory | $userFactory, | ||
| ?array | $extensionSources ) |
Definition at line 67 of file RecentChangeStore.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions().
| MediaWiki\RecentChanges\RecentChangeStore::addSourceForTest | ( | $name, | |
| $info ) |
Register an rc_source value.
| string | $name | |
| array | $info |
Definition at line 628 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::convertSourceToType | ( | string | $source | ) |
Convert an rc_source value to a legacy type string.
| string | $source |
Implements MediaWiki\RecentChanges\RecentChangeLookup.
Definition at line 685 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::convertTypeToSources | ( | $type | ) |
Convert a legacy type string, as used by the API, or an array of such strings, to an array of rc_source values.
| string | string[] | $type |
Implements MediaWiki\RecentChanges\RecentChangeLookup.
Definition at line 660 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::createCategorizationRecentChange | ( | string | $timestamp, |
| PageIdentity | $categoryTitle, | ||
| ?UserIdentity | $user, | ||
| string | $comment, | ||
| PageIdentity | $pageTitle, | ||
| int | $oldRevId, | ||
| int | $newRevId, | ||
| bool | $bot, | ||
| string | $ip = '', | ||
| int | $deleted = 0, | ||
| ?bool | $added = null, | ||
| bool | $forImport = false ) |
Create a RecentChange for a category membership change.
| string | $timestamp | Timestamp of the recent change to occur |
| PageIdentity | $categoryTitle | the category a page is being added to or removed from |
| UserIdentity | null | $user | User object of the user that made the change |
| string | $comment | Change summary |
| PageIdentity | $pageTitle | the page that is being added or removed |
| int | $oldRevId | Parent revision ID of this change |
| int | $newRevId | Revision ID of this change |
| bool | $bot | true, if the change was made by a bot |
| string | $ip | IP address of the user, if the change was made anonymously |
| int | $deleted | Indicates whether the change has been deleted |
| bool | null | $added | true, if the category was added, false for removed |
| bool | $forImport | Whether the associated revision was imported |
Implements MediaWiki\RecentChanges\RecentChangeFactory.
Definition at line 532 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::createEditRecentChange | ( | string | $timestamp, |
| PageIdentity | $page, | ||
| bool | $minor, | ||
| UserIdentity | $user, | ||
| string | $comment, | ||
| int | $oldId, | ||
| bool | $bot, | ||
| string | $ip = '', | ||
| ?int | $oldSize = 0, | ||
| ?int | $newSize = 0, | ||
| int | $newId = 0, | ||
| int | $patrol = 0, | ||
| array | $tags = [], | ||
| ?EditResult | $editResult = null ) |
Create a RecentChange for an edit.
| string | $timestamp | Timestamp of the edit to occur |
| PageIdentity | $page | Page of the edit to occur |
| bool | $minor | Whether the edit is minor |
| UserIdentity | $user | User who made the edit |
| string | $comment | Summary of the edit |
| int | $oldId | ID of the previous revision |
| bool | $bot | Whether the edit was made by a bot |
| string | $ip | IP address of the user, if the edit was made anonymously |
| int | null | $oldSize | Size of the previous revision |
| int | null | $newSize | Size of the new revision |
| int | $newId | ID of the new revision |
| int | $patrol | Whether the edit was patrolled (PRC_UNPATROLLED, PRC_PATROLLED, PRC_AUTOPATROLLED) |
| string[] | $tags | |
| EditResult | null | $editResult | EditResult associated with this edit. Can be safely skipped if the edit is not a revert. Used only for marking revert tags. |
Implements MediaWiki\RecentChanges\RecentChangeFactory.
Definition at line 307 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::createLogRecentChange | ( | string | $timestamp, |
| PageReference | $logPage, | ||
| UserIdentity | $user, | ||
| string | $actionComment, | ||
| string | $ip, | ||
| string | $type, | ||
| string | $action, | ||
| PageReference | $target, | ||
| string | $logComment, | ||
| string | $params, | ||
| int | $newId = 0, | ||
| string | $actionCommentIRC = '', | ||
| int | $revId = 0, | ||
| bool | $isPatrollable = false, | ||
| ?bool | $forceBotFlag = null, | ||
| int | $deleted = 0 ) |
Create a RecentChange for a log entry.
| string | $timestamp | Timestamp of the log entry to occur |
| PageReference | $logPage | |
| UserIdentity | $user | User who performed the log action |
| string | $actionComment | Summary of the log action |
| string | $ip | IP address of the user, if the log action was made anonymously |
| string | $type | Log type |
| string | $action | Log action |
| PageReference | $target | Target of the log action |
| string | $logComment | |
| string | $params | |
| int | $newId | |
| string | $actionCommentIRC | IRC comment of the log action |
| int | $revId | Id of associated revision, if any |
| bool | $isPatrollable | Whether this log entry is patrollable |
| bool | null | $forceBotFlag | Override the default behavior and set bot flag to the value of the argument. When omitted or null, it falls back to the global state. |
| int | $deleted |
Implements MediaWiki\RecentChanges\RecentChangeFactory.
Definition at line 429 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::createNewPageRecentChange | ( | string | $timestamp, |
| PageIdentity | $page, | ||
| bool | $minor, | ||
| UserIdentity | $user, | ||
| string | $comment, | ||
| bool | $bot, | ||
| string | $ip = '', | ||
| ?int | $size = 0, | ||
| int | $newId = 0, | ||
| int | $patrol = 0, | ||
| array | $tags = [] ) |
Create a RecentChange for a new page.
| string | $timestamp | Timestamp of the page creation to occur |
| PageIdentity | $page | created page |
| bool | $minor | Whether the page creation is minor |
| UserIdentity | $user | User who made the page creation |
| string | $comment | Summary of the page creation |
| bool | $bot | Whether the page creation was made by a bot |
| string | $ip | IP address of the user, if the page creation was made anonymously |
| int | null | $size | Size of the new revision |
| int | $newId | ID of the new revision |
| int | $patrol | Whether the edit was patrolled (PRC_UNPATROLLED, PRC_PATROLLED, PRC_AUTOPATROLLED) |
| string[] | $tags |
Implements MediaWiki\RecentChanges\RecentChangeFactory.
Definition at line 370 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::getAllSources | ( | ) |
Get all known rc_source values.
Implements MediaWiki\RecentChanges\RecentChangeLookup.
Definition at line 649 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::getPrimarySources | ( | ) |
Get the rc_source values for events that are not replicated from elsewhere.
Implements MediaWiki\RecentChanges\RecentChangeLookup.
Definition at line 632 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::getRecentChangeByConds | ( | array | $conds, |
| string | $fname = __METHOD__, | ||
| bool | $fromPrimary = false ) |
Get the first recent change matching some specific conditions.
| array | $conds | Array of conditions |
| string | $fname | Override the method name in profiling/logs |
| bool | $fromPrimary | Whether to fetch from the primary database |
Implements MediaWiki\RecentChanges\RecentChangeLookup.
Definition at line 118 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::getRecentChangeById | ( | int | $rcid | ) |
Get a recent change by its ID.
| int | $rcid | The rc_id value to retrieve |
Implements MediaWiki\RecentChanges\RecentChangeLookup.
Definition at line 111 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::insertRecentChange | ( | RecentChange | $recentChange, |
| bool | $send = self::SEND_FEED ) |
Insert a recent change into the database.For compatibility reasons, the SEND_ constants internally reference a value that may seem negated from their purpose (none=true, feed=false). This is because the parameter used to be called "$noudp", defaulting to false.
| RecentChange | $recentChange | |
| bool | $send | self::SEND_FEED or self::SEND_NONE |
Implements MediaWiki\RecentChanges\RecentChangeFactory.
Definition at line 145 of file RecentChangeStore.php.
References MediaWiki\RecentChanges\RecentChange\getAttribute(), MediaWiki\RecentChanges\RecentChange\getAttributes(), MediaWiki\RecentChanges\RecentChange\getEditResult(), MediaWiki\RecentChanges\RecentChange\getExtra(), MediaWiki\RecentChanges\RecentChange\getExtras(), MediaWiki\RecentChanges\RecentChange\getPage(), MediaWiki\RecentChanges\RecentChange\getPerformerIdentity(), MediaWiki\RecentChanges\RecentChange\getTags(), MediaWiki\RecentChanges\RecentChange\setAttribute(), and MediaWiki\RecentChanges\RecentChange\setExtra().
|
static |
Whether e-mail notifications are generally enabled on this wiki.
This is used for:
TODO: Determine whether these optimizations still make sense.
FIXME: The $wgShowUpdatedMarker variable was added to this condtion in 2008 (2cf12c973d, SVN r35001) because at the time the per-user "last seen" marker for watchlist and page history, was managed by the RecentChangeNotifier/UserMailer classes. As of August 2022, this appears to no longer be the case.
| ServiceOptions | $options |
Definition at line 298 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::isFromPrimarySource | ( | RecentChange | $rc | ) |
Check if a recent change is from a primary source.
| RecentChange | $rc |
Implements MediaWiki\RecentChanges\RecentChangeLookup.
Definition at line 645 of file RecentChangeStore.php.
| MediaWiki\RecentChanges\RecentChangeStore::newRecentChangeFromRow | ( | $row | ) |
Create a new RecentChange object from a database row.
| stdClass | $row | Database row from recentchanges table |
Implements MediaWiki\RecentChanges\RecentChangeFactory.
Definition at line 102 of file RecentChangeStore.php.
| const MediaWiki\RecentChanges\RecentChangeStore::CONSTRUCTOR_OPTIONS |
Definition at line 39 of file RecentChangeStore.php.