43 throw new LogicException(
'Not implemented!' );
49 throw new LogicException(
'Not implemented!' );
53 return $this->row->rc_logid;
57 return $this->row->rc_params;
61 return $this->row->rc_this_oldid;
65 return $this->row->rc_log_type;
69 return $this->row->rc_log_action;
73 if ( !$this->performer ) {
74 $actorStore = MediaWikiServices::getInstance()->getActorStore();
75 $userFactory = MediaWikiServices::getInstance()->getUserFactory();
76 if ( isset( $this->row->rc_actor ) ) {
78 $this->performer = $actorStore->newActorFromRowFields(
79 $this->row->rc_user ?? 0,
80 $this->row->rc_user_text,
83 }
catch ( InvalidArgumentException $e ) {
84 $this->performer = $actorStore->getUnknownActor();
85 LoggerFactory::getInstance(
'logentry' )->warning(
86 'Failed to instantiate RC log entry performer', [
88 'log_id' => $this->
getId()
92 } elseif ( isset( $this->row->rc_user ) ) {
93 $this->performer = $userFactory->newFromId( $this->row->rc_user )->getUser();
94 } elseif ( isset( $this->row->rc_user_text ) ) {
95 $user = $userFactory->newFromName( $this->row->rc_user_text );
97 $this->performer = $user->getUser();
99 $this->performer = $actorStore->getUnknownActor();
100 LoggerFactory::getInstance(
'logentry' )->warning(
101 'Failed to instantiate RC log entry performer', [
102 'rc_user_text' => $this->row->rc_user_text,
103 'log_id' => $this->getId()
113 $namespace = $this->row->rc_namespace;
114 $page = $this->row->rc_title;
115 return Title::makeTitle( $namespace, $page );
119 return wfTimestamp( TS_MW, $this->row->rc_timestamp );
123 return MediaWikiServices::getInstance()->getCommentStore()
129 return $this->row->rc_deleted;
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
if(!defined('MW_SETUP_CALLBACK'))
A value class to process existing log entries.
A subclass of DatabaseLogEntry for objects constructed from entries in the recentchanges table (rathe...
getTimestamp()
Get the timestamp when the action was executed.
getTarget()
Get the target page of this action.
static newFromId( $id, IDatabase $db)
Loads a LogEntry with the given id from database.
static getSelectQueryData()
Returns array of information that is needed for querying log entries.
getSubtype()
The log subtype.
getComment()
Get the user provided comment.
getDeleted()
Get the access restriction.
getRawParameters()
Returns whatever is stored in the database field (typically a serialized associative array but very o...
getId()
Returns the unique database id.
getType()
The main log type.