42 throw new LogicException(
'Not implemented!' );
48 throw new LogicException(
'Not implemented!' );
52 return $this->row->rc_logid;
56 return $this->row->rc_params;
60 return $this->row->rc_this_oldid;
64 return $this->row->rc_log_type;
68 return $this->row->rc_log_action;
72 if ( !$this->performer ) {
73 $actorStore = MediaWikiServices::getInstance()->getActorStore();
74 $userFactory = MediaWikiServices::getInstance()->getUserFactory();
75 if ( isset( $this->row->rc_actor ) ) {
77 $this->performer = $actorStore->newActorFromRowFields(
78 $this->row->rc_user ?? 0,
79 $this->row->rc_user_text,
82 }
catch ( InvalidArgumentException $e ) {
83 $this->performer = $actorStore->getUnknownActor();
84 LoggerFactory::getInstance(
'logentry' )->warning(
85 'Failed to instantiate RC log entry performer', [
87 'log_id' => $this->
getId()
91 } elseif ( isset( $this->row->rc_user ) ) {
92 $this->performer = $userFactory->newFromId( $this->row->rc_user )->getUser();
93 } elseif ( isset( $this->row->rc_user_text ) ) {
94 $user = $userFactory->newFromName( $this->row->rc_user_text );
96 $this->performer = $user->getUser();
98 $this->performer = $actorStore->getUnknownActor();
99 LoggerFactory::getInstance(
'logentry' )->warning(
100 'Failed to instantiate RC log entry performer', [
101 'rc_user_text' => $this->row->rc_user_text,
102 'log_id' => $this->getId()
112 $namespace = $this->row->rc_namespace;
113 $page = $this->row->rc_title;
118 return wfTimestamp( TS_MW, $this->row->rc_timestamp );
128 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'))
The persistent session ID (if any) loaded at startup.
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.
getId()
Returns the unique database id.
getType()
The main log type.
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.