Go to the documentation of this file.
47 $tables = array_merge(
48 [
'logging' ], $commentQuery[
'tables'], $actorQuery[
'tables'], [
'user' ]
51 'log_id',
'log_type',
'log_action',
'log_timestamp',
52 'log_namespace',
'log_title',
53 'log_params',
'log_deleted',
54 'user_id',
'user_name',
'user_editcount',
55 ] + $commentQuery[
'fields'] + $actorQuery[
'fields'];
59 'user' => [
'LEFT JOIN',
'user_id=' . $actorQuery[
'fields'][
'log_user'] ],
60 ] + $commentQuery[
'joins'] + $actorQuery[
'joins'];
67 'join_conds' => $joins,
80 if ( isset(
$row->rc_logid ) ) {
83 return new self(
$row );
96 $queryInfo[
'conds'] += [
'log_id' => $id ];
102 $queryInfo[
'options'],
103 $queryInfo[
'join_conds']
136 return (
int)$this->row->log_id;
145 return $this->row->log_params;
155 return $this->row->log_type;
159 return $this->row->log_action;
163 if ( !isset( $this->params ) ) {
165 Wikimedia\suppressWarnings();
167 Wikimedia\restoreWarnings();
170 $this->legacy =
false;
173 $this->legacy =
true;
176 if ( isset( $this->params[
'associated_rev_id'] ) ) {
177 $this->revId = $this->params[
'associated_rev_id'];
178 unset( $this->params[
'associated_rev_id'] );
192 if ( !$this->performer ) {
193 $actorId = isset( $this->row->log_actor ) ? (int)$this->row->log_actor : 0;
194 $userId = (
int)$this->row->log_user;
195 if ( $userId !== 0 || $actorId !== 0 ) {
197 if ( isset( $this->row->user_name ) ) {
199 } elseif ( $actorId !== 0 ) {
206 $userText = $this->row->log_user_text;
215 $namespace = $this->row->log_namespace;
216 $page = $this->row->log_title;
221 return wfTimestamp( TS_MW, $this->row->log_timestamp );
229 return $this->row->log_deleted;
static newFromId( $id)
Static factory method for creation from a given user ID.
A subclass of DatabaseLogEntry for objects constructed from entries in the recentchanges table (rathe...
getId()
Returns the unique database id.
array $params
Parameters for log entry.
static extractParams( $blob)
Extract a parameter array from a blob.
getParameters()
Get the extra parameters stored for this message.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
static getSelectQueryData()
Returns array of information that is needed for querying log entries.
static newFromId( $id, IDatabase $db)
Loads a LogEntry with the given id from database.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
getComment()
Get the user provided comment.
static newFromRow( $row, $data=null)
Create a new user object from a user row.
getSubtype()
The log subtype.
static newMigration()
Static constructor.
getTimestamp()
Get the timestamp when the action was executed.
static newFromRow( $row)
Constructs new LogEntry from database result row.
getType()
The main log type.
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Extends the LogEntry Interface with some basic functionality.
static extractParams( $blob)
Extract a parameter array from a blob.
getPerformer()
Get the user who performed this action.
int $revId
A rev id associated to the log entry.
bool $legacy
Whether the parameters for this log entry are stored in new or old format.
static newFromActorId( $id)
Static factory method for creation from a given actor ID.
A value class to process existing log entries.
isLegacy()
Whether the parameters for this log are stored in new or old format.
getTarget()
Get the target page of this action.
stdClass $row
Database result row.
getDeleted()
Get the access restriction.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
getRawParameters()
Returns whatever is stored in the database field.