32use Wikimedia\Assert\Assert;
98 public const SEND_NONE =
true;
103 public const SEND_FEED =
false;
171 if ( is_array(
$type ) ) {
174 $retval[] = self::parseToRCType(
$t );
180 if ( !array_key_exists(
$type, self::CHANGE_TYPES ) ) {
183 return self::CHANGE_TYPES[
$type];
193 return array_search( $rcType, self::CHANGE_TYPES,
true ) ?:
"$rcType";
204 return array_keys( self::CHANGE_TYPES );
214 return self::newFromConds( [
'rc_id' => $rcid ], __METHOD__ );
232 $rcQuery = self::getQueryInfo();
233 $row = $db->selectRow(
234 $rcQuery[
'tables'], $rcQuery[
'fields'], $conds, $fname, [], $rcQuery[
'joins']
236 if ( $row !==
false ) {
237 return self::newFromRow( $row );
258 $commentQuery = CommentStore::getStore()->getJoin(
'rc_comment' );
262 'recentchanges_actor' =>
'actor'
263 ] + $commentQuery[
'tables'],
287 'rc_user' =>
'recentchanges_actor.actor_user',
288 'rc_user_text' =>
'recentchanges_actor.actor_name',
289 ] + $commentQuery[
'fields'],
291 'recentchanges_actor' => [
'JOIN',
'actor_id=rc_actor' ]
292 ] + $commentQuery[
'joins'],
301 return Title::castFromPageReference( $this->mPage );
315 $this->mAttribs = $attribs;
322 $this->mExtra = $extra;
330 $this->mPage = Title::castFromPageReference( $this->
getPage() );
331 return $this->mPage ?: Title::makeTitle(
NS_SPECIAL,
'BadTitle' );
339 if ( !$this->mPage ) {
344 if ( ( $this->mAttribs[
'rc_title'] ??
'' ) ===
'' ) {
353 (
int)$this->mAttribs[
'rc_namespace'],
354 $this->mAttribs[
'rc_title'],
370 if ( !$this->mPerformer instanceof
User ) {
374 return $this->mPerformer;
385 if ( !$this->mPerformer ) {
386 $this->mPerformer = $this->getUserIdentityFromAnyId(
387 $this->mAttribs[
'rc_user'] ??
null,
388 $this->mAttribs[
'rc_user_text'] ??
null,
389 $this->mAttribs[
'rc_actor'] ??
null
393 return $this->mPerformer;
405 public function save( $send = self::SEND_FEED ) {
409 if ( !is_array( $this->mExtra ) ) {
414 $this->mAttribs[
'rc_ip'] =
'';
417 # Strict mode fixups (not-NULL fields)
418 foreach ( [
'minor',
'bot',
'new',
'patrolled',
'deleted' ] as $field ) {
419 $this->mAttribs[
"rc_$field"] = (int)$this->mAttribs[
"rc_$field"];
421 # ...more fixups (NULL fields)
422 foreach ( [
'old_len',
'new_len' ] as $field ) {
423 $this->mAttribs[
"rc_$field"] = isset( $this->mAttribs[
"rc_$field"] )
424 ? (int)$this->mAttribs[
"rc_$field"]
428 # If our database is strict about IP addresses, use NULL instead of an empty string
429 $strictIPs = $dbw->getType() ===
'postgres';
430 if ( $strictIPs && $this->mAttribs[
'rc_ip'] ==
'' ) {
431 unset( $this->mAttribs[
'rc_ip'] );
434 $row = $this->mAttribs;
436 # Trim spaces on user supplied text
437 $row[
'rc_comment'] = trim( $row[
'rc_comment'] );
439 # Fixup database timestamps
440 $row[
'rc_timestamp'] = $dbw->timestamp( $row[
'rc_timestamp'] );
442 # # If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL
443 if ( $row[
'rc_cur_id'] == 0 ) {
444 unset( $row[
'rc_cur_id'] );
447 # Convert mAttribs['rc_comment'] for CommentStore
448 $comment = $row[
'rc_comment'];
449 unset( $row[
'rc_comment'], $row[
'rc_comment_text'], $row[
'rc_comment_data'] );
450 $row += CommentStore::getStore()->insert( $dbw,
'rc_comment', $comment );
452 # Normalize UserIdentity to actor ID
453 $user = $this->getPerformerIdentity();
454 $actorStore = MediaWikiServices::getInstance()->getActorStore();
455 $row[
'rc_actor'] = $actorStore->acquireActorId( $user, $dbw );
456 unset( $row[
'rc_user'], $row[
'rc_user_text'] );
458 # Don't reuse an existing rc_id for the new row, if one happens to be
459 # set for some reason.
460 unset( $row[
'rc_id'] );
463 $dbw->insert(
'recentchanges', $row, __METHOD__ );
466 $this->mAttribs[
'rc_id'] = $dbw->insertId();
469 Hooks::runner()->onRecentChange_save( $this );
472 if ( $this->editResult !==
null && count( $this->editResult->getRevertTags() ) ) {
474 $this->editResult->getRevertTags(),
475 $this->mAttribs[
'rc_id'],
476 $this->mAttribs[
'rc_this_oldid'],
477 $this->mAttribs[
'rc_logid'],
478 FormatJson::encode( $this->editResult ),
483 if ( count( $this->tags ) ) {
488 $this->mAttribs[
'rc_id'],
489 $this->mAttribs[
'rc_this_oldid'],
490 $this->mAttribs[
'rc_logid'],
496 if ( $send === self::SEND_FEED ) {
498 $this->notifyRCFeeds();
501 # E-mail notifications
503 $userFactory = MediaWikiServices::getInstance()->getUserFactory();
504 $editor = $userFactory->newFromUserIdentity( $this->getPerformerIdentity() );
505 $page = $this->getPage();
506 $title = Title::castFromPageReference( $page );
511 Hooks::runner()->onAbortEmailNotification( $editor,
$title, $this ) &&
516 $dbw->onTransactionCommitOrIdle(
517 function () use ( $editor,
$title ) {
519 $enotif->notifyOnPageChange(
522 $this->mAttribs[
'rc_timestamp'],
523 $this->mAttribs[
'rc_comment'],
524 $this->mAttribs[
'rc_minor'],
525 $this->mAttribs[
'rc_last_oldid'],
526 $this->mExtra[
'pageStatus']
536 if ( mt_rand( 0, 9 ) == 0 ) {
540 if ( $this->mAttribs[
'rc_user'] > 0 ) {
543 JobQueueGroup::singleton()->lazyPush( $jobs );
552 if ( $feeds ===
null ) {
556 $performer = $this->getPerformerIdentity();
558 foreach ( $feeds as $params ) {
560 'omit_bots' =>
false,
561 'omit_anon' =>
false,
562 'omit_user' =>
false,
563 'omit_minor' =>
false,
564 'omit_patrolled' =>
false,
568 ( $params[
'omit_bots'] && $this->mAttribs[
'rc_bot'] ) ||
569 ( $params[
'omit_anon'] && !$performer->isRegistered() ) ||
570 ( $params[
'omit_user'] && $performer->isRegistered() ) ||
571 ( $params[
'omit_minor'] && $this->mAttribs[
'rc_minor'] ) ||
572 ( $params[
'omit_patrolled'] && $this->mAttribs[
'rc_patrolled'] ) ||
578 $actionComment = $this->mExtra[
'actionCommentIRC'] ??
null;
581 $feed->notify( $this, $actionComment );
593 public static function getEngine( $uri, $params = [] ) {
596 $scheme = parse_url( $uri, PHP_URL_SCHEME );
598 throw new MWException(
"Invalid RCFeed uri: '$uri'" );
601 throw new MWException(
"Unknown RCFeedEngine scheme: '$scheme'" );
603 if ( defined(
'MW_PHPUNIT_TEST' ) && is_object(
$wgRCEngines[$scheme] ) ) {
626 if ( $tags ===
null ) {
628 } elseif ( is_string( $tags ) ) {
632 $status = PermissionStatus::newEmpty();
637 $this->getAttribute(
'rc_log_type' ) ==
'upload' ) ) ) {
638 $status->fatal(
'rcpatroldisabled' );
642 $user = MediaWikiServices::getInstance()->getUserFactory()->newFromAuthority( $performer );
643 if ( !Hooks::runner()->onMarkPatrolled(
644 $this->getAttribute(
'rc_id' ), $user,
false, $auto, $tags )
646 $status->fatal(
'hookaborted' );
649 if ( $performer->
getUser()->getName() === $this->getAttribute(
'rc_user_text' ) &&
652 $status->fatal(
'markedaspatrollederror-noautopatrol' );
654 if ( !$status->isGood() ) {
655 return $status->toLegacyErrorArray();
658 if ( $this->getAttribute(
'rc_patrolled' ) ) {
662 $this->reallyMarkPatrolled();
666 Hooks::runner()->onMarkPatrolledComplete(
667 $this->getAttribute(
'rc_id' ), $user,
false, $auto );
681 'rc_patrolled' => self::PRC_PATROLLED
684 'rc_id' => $this->getAttribute(
'rc_id' )
690 $this->
getTitle()->invalidateCache();
693 $revisionId = $this->getAttribute(
'rc_this_oldid' );
695 $revertedTagUpdateManager =
696 MediaWikiServices::getInstance()->getRevertedTagUpdateManager();
697 $revertedTagUpdateManager->approveRevertedTagForRevision( $revisionId );
700 return $dbw->affectedRows();
728 $timestamp, $page, $minor, $user, $comment, $oldId, $lastTimestamp,
729 $bot, $ip =
'', $oldSize = 0, $newSize = 0, $newId = 0, $patrol = 0,
732 Assert::parameter( $page->exists(),
'$page',
'must represent an existing page' );
736 $rc->mPerformer = $user;
738 'rc_timestamp' => $timestamp,
739 'rc_namespace' => $page->getNamespace(),
740 'rc_title' => $page->getDBkey(),
742 'rc_source' => self::SRC_EDIT,
743 'rc_minor' => $minor ? 1 : 0,
744 'rc_cur_id' => $page->getId(),
745 'rc_user' => $user->getId(),
746 'rc_user_text' => $user->getName(),
747 'rc_comment' => &$comment,
748 'rc_comment_text' => &$comment,
749 'rc_comment_data' =>
null,
750 'rc_this_oldid' => (int)$newId,
751 'rc_last_oldid' => $oldId,
752 'rc_bot' => $bot ? 1 : 0,
753 'rc_ip' => self::checkIPAddress( $ip ),
754 'rc_patrolled' => intval( $patrol ),
755 'rc_new' => 0, # obsolete
756 'rc_old_len' => $oldSize,
757 'rc_new_len' => $newSize,
760 'rc_log_type' =>
null,
761 'rc_log_action' =>
'',
766 $formatter = MediaWikiServices::getInstance()->getTitleFormatter();
769 'prefixedDBkey' => $formatter->getPrefixedDBkey( $page ),
770 'lastTimestamp' => $lastTimestamp,
771 'oldSize' => $oldSize,
772 'newSize' => $newSize,
773 'pageStatus' =>
'changed'
776 DeferredUpdates::addCallableUpdate(
777 static function () use ( $rc, $tags, $editResult ) {
778 $rc->addTags( $tags );
779 $rc->setEditResult( $editResult );
782 DeferredUpdates::POSTSEND,
810 $page, $minor, $user, $comment, $bot,
811 $ip =
'', $size = 0, $newId = 0, $patrol = 0, $tags = []
813 Assert::parameter( $page->exists(),
'$page',
'must represent an existing page' );
817 $rc->mPerformer = $user;
819 'rc_timestamp' => $timestamp,
820 'rc_namespace' => $page->getNamespace(),
821 'rc_title' => $page->getDBkey(),
823 'rc_source' => self::SRC_NEW,
824 'rc_minor' => $minor ? 1 : 0,
825 'rc_cur_id' => $page->getId(),
826 'rc_user' => $user->getId(),
827 'rc_user_text' => $user->getName(),
828 'rc_comment' => &$comment,
829 'rc_comment_text' => &$comment,
830 'rc_comment_data' =>
null,
831 'rc_this_oldid' => (int)$newId,
832 'rc_last_oldid' => 0,
833 'rc_bot' => $bot ? 1 : 0,
834 'rc_ip' => self::checkIPAddress( $ip ),
835 'rc_patrolled' => intval( $patrol ),
836 'rc_new' => 1, # obsolete
838 'rc_new_len' => $size,
841 'rc_log_type' =>
null,
842 'rc_log_action' =>
'',
847 $formatter = MediaWikiServices::getInstance()->getTitleFormatter();
850 'prefixedDBkey' => $formatter->getPrefixedDBkey( $page ),
851 'lastTimestamp' => 0,
854 'pageStatus' =>
'created'
857 DeferredUpdates::addCallableUpdate(
858 static function () use ( $rc, $tags ) {
859 $rc->addTags( $tags );
862 DeferredUpdates::POSTSEND,
886 $logPage, $user, $actionComment, $ip,
$type,
887 $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC =
''
891 # Don't add private logs to RC!
895 $rc = self::newLogEntry( $timestamp,
896 $logPage, $user, $actionComment, $ip,
$type, $action,
897 $target, $logComment, $params, $newId, $actionCommentIRC );
922 $logPage, $user, $actionComment, $ip,
923 $type, $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC =
'',
924 $revId = 0, $isPatrollable =
false ) {
926 $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
928 # # Get pageStatus for email notification
929 switch (
$type .
'-' . $action ) {
930 case 'delete-delete':
931 case 'delete-delete_redir':
932 case 'delete-delete_redir2':
933 $pageStatus =
'deleted';
936 case 'move-move_redir':
937 $pageStatus =
'moved';
939 case 'delete-restore':
940 $pageStatus =
'restored';
942 case 'upload-upload':
943 $pageStatus =
'created';
945 case 'upload-overwrite':
947 $pageStatus =
'changed';
952 $canAutopatrol = $permissionManager->userHasRight( $user,
'autopatrol' );
953 $markPatrolled = $isPatrollable ? $canAutopatrol :
true;
956 $pageId = $target->getId();
962 $rc->mPage = $target;
963 $rc->mPerformer = $user;
965 'rc_timestamp' => $timestamp,
966 'rc_namespace' => $target->getNamespace(),
967 'rc_title' => $target->getDBkey(),
969 'rc_source' => self::SRC_LOG,
971 'rc_cur_id' => $pageId,
972 'rc_user' => $user->getId(),
973 'rc_user_text' => $user->getName(),
974 'rc_comment' => &$logComment,
975 'rc_comment_text' => &$logComment,
976 'rc_comment_data' =>
null,
977 'rc_this_oldid' => (int)$revId,
978 'rc_last_oldid' => 0,
979 'rc_bot' => $permissionManager->userHasRight( $user,
'bot' ) ?
981 'rc_ip' => self::checkIPAddress( $ip ),
982 'rc_patrolled' => $markPatrolled ? self::PRC_AUTOPATROLLED : self::PRC_UNPATROLLED,
983 'rc_new' => 0, # obsolete
984 'rc_old_len' =>
null,
985 'rc_new_len' =>
null,
987 'rc_logid' => $newId,
988 'rc_log_type' =>
$type,
989 'rc_log_action' => $action,
990 'rc_params' => $params
994 $formatter = MediaWikiServices::getInstance()->getTitleFormatter();
1000 'prefixedDBkey' => $formatter->getPrefixedDBkey( $logPage ),
1001 'lastTimestamp' => 0,
1002 'actionComment' => $actionComment,
1003 'pageStatus' => $pageStatus,
1004 'actionCommentIRC' => $actionCommentIRC
1046 $categoryWikiPage = MediaWikiServices::getInstance()->getWikiPageFactory()
1047 ->newFromTitle( $categoryTitle );
1049 '@phan-var WikiCategoryPage $categoryWikiPage';
1051 'hidden-cat' => $categoryWikiPage->isHidden()
1053 if ( $added !==
null ) {
1054 $params[
'added'] = $added;
1059 $user = MediaWikiServices::getInstance()->getActorStore()->getUnknownActor();
1063 $rc->mPage = $categoryTitle;
1064 $rc->mPerformer = $user;
1066 'rc_timestamp' => MWTimestamp::convert( TS_MW, $timestamp ),
1068 'rc_title' => $categoryTitle->
getDBkey(),
1070 'rc_source' => self::SRC_CATEGORIZE,
1074 'rc_cur_id' => $pageTitle->
getId(),
1075 'rc_user' => $user->
getId(),
1076 'rc_user_text' => $user->
getName(),
1077 'rc_comment' => &$comment,
1078 'rc_comment_text' => &$comment,
1079 'rc_comment_data' =>
null,
1080 'rc_this_oldid' => (int)$newRevId,
1081 'rc_last_oldid' => $oldRevId,
1082 'rc_bot' => $bot ? 1 : 0,
1083 'rc_ip' => self::checkIPAddress( $ip ),
1084 'rc_patrolled' => self::PRC_AUTOPATROLLED,
1085 'rc_new' => 0, # obsolete
1086 'rc_old_len' =>
null,
1087 'rc_new_len' =>
null,
1088 'rc_deleted' => $deleted,
1090 'rc_log_type' =>
null,
1091 'rc_log_action' =>
'',
1096 $formatter = MediaWikiServices::getInstance()->getTitleFormatter();
1099 'prefixedDBkey' => $formatter->getPrefixedDBkey( $categoryTitle ),
1100 'lastTimestamp' => $lastTimestamp,
1103 'pageStatus' =>
'changed'
1118 $params = $this->parseParams();
1119 return $params[$name] ??
null;
1128 $this->mAttribs = get_object_vars( $row );
1129 $this->mAttribs[
'rc_timestamp'] =
wfTimestamp( TS_MW, $this->mAttribs[
'rc_timestamp'] );
1131 $this->mAttribs[
'rc_deleted'] = $row->rc_deleted;
1133 if ( isset( $this->mAttribs[
'rc_ip'] ) ) {
1135 $n = strpos( $this->mAttribs[
'rc_ip'],
'/' );
1136 if ( $n !==
false ) {
1137 $this->mAttribs[
'rc_ip'] = substr( $this->mAttribs[
'rc_ip'], 0, $n );
1141 $comment = CommentStore::getStore()
1145 $this->mAttribs[
'rc_comment'] = &$comment;
1146 $this->mAttribs[
'rc_comment_text'] = &$comment;
1147 $this->mAttribs[
'rc_comment_data'] =
null;
1149 $this->mPerformer = $this->getUserIdentityFromAnyId(
1150 $row->rc_user ??
null,
1151 $row->rc_user_text ??
null,
1152 $row->rc_actor ??
null
1154 $this->mAttribs[
'rc_user'] = $this->mPerformer->getId();
1155 $this->mAttribs[
'rc_user_text'] = $this->mPerformer->getName();
1158 if ( isset( $row->we_expiry ) && $row->we_expiry ) {
1159 $this->watchlistExpiry =
wfTimestamp( TS_MW, $row->we_expiry );
1170 if ( $name ===
'rc_comment' ) {
1171 return CommentStore::getStore()
1172 ->getComment(
'rc_comment', $this->mAttribs,
true )->text;
1175 if ( $name ===
'rc_user' || $name ===
'rc_user_text' || $name ===
'rc_actor' ) {
1176 $user = $this->getPerformerIdentity();
1178 if ( $name ===
'rc_user' ) {
1179 return $user->getId();
1181 if ( $name ===
'rc_user_text' ) {
1182 return $user->getName();
1184 if ( $name ===
'rc_actor' ) {
1187 $actorStore = MediaWikiServices::getInstance()->getActorStore();
1189 return $actorStore->findActorId( $user, $db );
1193 return $this->mAttribs[$name] ??
null;
1200 return $this->mAttribs;
1210 if ( $this->mAttribs[
'rc_type'] ==
RC_EDIT ) {
1211 $trail =
"curid=" . (int)( $this->mAttribs[
'rc_cur_id'] ) .
1212 "&oldid=" . (int)( $this->mAttribs[
'rc_last_oldid'] );
1214 $trail .=
'&diff=0';
1216 $trail .=
'&diff=' . (int)( $this->mAttribs[
'rc_this_oldid'] );
1234 $old = $this->mAttribs[
'rc_old_len'];
1237 $new = $this->mAttribs[
'rc_new_len'];
1239 if ( $old ===
null || $new ===
null ) {
1243 return ChangesList::showCharacterDifference( $old, $new );
1249 if ( !IPUtils::isIPAddress( $ip ) ) {
1250 throw new MWException(
"Attempt to write \"" . $ip .
1251 "\" as an IP address into recent changes" );
1286 $rcParams = $this->getAttribute(
'rc_params' );
1288 Wikimedia\suppressWarnings();
1290 Wikimedia\restoreWarnings();
1292 return $unserializedParams;
1304 if ( is_string( $tags ) ) {
1305 $this->tags[] = $tags;
1307 $this->tags = array_merge( $tags, $this->tags );
1319 $this->editResult = $editResult;
1336 $userId = isset( $userId ) ? (int)$userId : null;
1337 $actorId = isset( $actorId ) ? (int)$actorId : 0;
1339 $actorStore = MediaWikiServices::getInstance()->getActorStore();
1340 if ( $userName && $actorId ) {
1343 return $actorStore->newActorFromRowFields( $userId, $userName, $actorId );
1345 if ( $userId !==
null ) {
1346 if ( $userName !==
null ) {
1350 $user = $actorStore->getUserIdentityByUserId( $userId );
1353 throw new RuntimeException(
"User not found by ID: $userId" );
1356 } elseif ( $actorId > 0 ) {
1358 $user = $actorStore->getActorById( $actorId, $db );
1361 throw new RuntimeException(
"User not found by actor ID: $actorId" );
1363 } elseif ( $userName !==
null ) {
1364 $user = $actorStore->getUserIdentityByName( $userName );
1367 throw new RuntimeException(
"User not found by name: $userName" );
1370 throw new RuntimeException(
'At least one of user ID, actor ID or user name must be given' );
unserialize( $serialized)
$wgRCFeeds
Configuration for feeds to which notifications about recent changes will be sent.
$wgPutIPinRC
Log IP addresses in the recentchanges table; can be accessed only by extensions (e....
$wgUseFilePatrol
Use file patrolling to check new files on Special:Newfiles.
$wgLogRestrictions
This restricts log access to those who have a certain right Users without this will not see it in the...
$wgShowUpdatedMarker
Show "Updated (since my last visit)" marker in RC view, watchlist and history view for watched pages ...
$wgUseRCPatrol
Use RC Patrolling to check for vandalism (from recent changes and watchlists) New pages and new files...
$wgUseNPPatrol
Use new page patrolling to check new pages on Special:Newpages.
$wgRCMaxAge
Recentchanges items are periodically purged; entries older than this many seconds will go.
$wgRCEngines
Used by RecentChange::getEngine to find the correct engine for a given URI scheme.
deprecatePublicPropertyFallback(string $property, string $version, callable $getter, ?callable $setter=null, $class=null, $component=null)
Mark a removed public property as deprecated and provide fallback getter and setter callables.
trait DeprecationHelper
Use this trait in classes which have properties for which public access is deprecated or implementati...
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfDeprecatedMsg( $msg, $version=false, $component=false, $callerOffset=2)
Log a deprecation warning with arbitrary message text.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
if(ini_get('mbstring.func_overload')) if(!defined('MW_ENTRY_POINT'))
Pre-config setup: Before loading LocalSettings.php.
This module processes the email notifications when the current page is changed.
static record( $rc, $auto, UserIdentity $user, $tags=null)
Record a log event for a change being patrolled.
static factory(array $params)
Utility class for creating new RC entries.
static getEngine( $uri, $params=[])
static parseToRCType( $type)
Parsing text to RC_* constants.
setEditResult(?EditResult $editResult)
Sets the EditResult associated with the edit.
static notifyEdit( $timestamp, $page, $minor, $user, $comment, $oldId, $lastTimestamp, $bot, $ip='', $oldSize=0, $newSize=0, $newId=0, $patrol=0, $tags=[], EditResult $editResult=null)
Makes an entry in the database corresponding to an edit.
reallyMarkPatrolled()
Mark this RecentChange patrolled, without error checking.
static newForCategorization( $timestamp, PageIdentity $categoryTitle, ?UserIdentity $user, $comment, PageIdentity $pageTitle, $oldRevId, $newRevId, $lastTimestamp, $bot, $ip='', $deleted=0, $added=null)
Constructs a RecentChange object for the given categorization This does not call save() on the object...
doMarkPatrolled(Authority $performer, $auto=false, $tags=null)
Mark this RecentChange as patrolled.
parseParams()
Parses and returns the rc_params attribute.
getPerformer()
Get the User object of the person who performed this change.
static checkIPAddress( $ip)
static notifyNew( $timestamp, $page, $minor, $user, $comment, $bot, $ip='', $size=0, $newId=0, $patrol=0, $tags=[])
Makes an entry in the database corresponding to page creation.
static getChangeTypes()
Get an array of all change types.
static isInRCLifespan( $timestamp, $tolerance=0)
Check whether the given timestamp is new enough to have a RC row with a given tolerance as the recent...
int $counter
Line number of recent change.
UserIdentity null $mPerformer
save( $send=self::SEND_FEED)
Writes the data in this object to the database.
static getQueryInfo()
Return the tables, fields, and join conditions to be selected to create a new recentchanges object.
static newFromConds( $conds, $fname=__METHOD__, $dbType=DB_REPLICA)
Find the first recent change matching some specific conditions.
getCharacterDifference( $old=0, $new=0)
Returns the change size (HTML).
static parseFromRCType( $rcType)
Parsing RC_* constants to human-readable test.
EditResult null $editResult
EditResult associated with the edit.
notifyRCFeeds(array $feeds=null)
Notify all the feeds about the change.
PageReference null $mPage
array $tags
List of tags to apply.
getPerformerIdentity()
Get the UserIdentity of the client that performed this change.
getParam( $name)
Get a parameter value.
static newLogEntry( $timestamp, $logPage, $user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId=0, $actionCommentIRC='', $revId=0, $isPatrollable=false)
addTags( $tags)
Tags to append to the recent change, and associated revision/log.
getUserIdentityFromAnyId( $userId, $userName, $actorId=null)
loadFromRow( $row)
Initialises the members of this object from a mysql row object.
static notifyLog( $timestamp, $logPage, $user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId=0, $actionCommentIRC='')
getAttribute( $name)
Get an attribute value.
string null $watchlistExpiry
The expiry time, if this is a temporary watchlist item.
diffLinkTrail( $forceCur)
Gets the end part of the diff URL associated with this object Blank if no diff link should be display...
static newFromId( $rcid)
Obtain the recent change with a given rc_id value.
static newCacheUpdateJob()
This is to display changes made to all articles linked in an article.
Represents a title within MediaWiki.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static newFromIdentity(UserIdentity $identity)
Returns a User object corresponding to the given UserIdentity.
Interface for objects (potentially) representing an editable wiki page.
getId( $wikiId=self::LOCAL)
Returns the page ID.
canExist()
Checks whether this PageIdentity represents a "proper" page, meaning that it could exist as an editab...