MediaWiki  1.29.1
LogEntry.php
Go to the documentation of this file.
1 <?php
32 
38 interface LogEntry {
39 
45  public function getType();
46 
52  public function getSubtype();
53 
59  public function getFullType();
60 
66  public function getParameters();
67 
73  public function getPerformer();
74 
80  public function getTarget();
81 
87  public function getTimestamp();
88 
94  public function getComment();
95 
101  public function getDeleted();
102 
107  public function isDeleted( $field );
108 }
109 
115 abstract class LogEntryBase implements LogEntry {
116 
117  public function getFullType() {
118  return $this->getType() . '/' . $this->getSubtype();
119  }
120 
121  public function isDeleted( $field ) {
122  return ( $this->getDeleted() & $field ) === $field;
123  }
124 
131  public function isLegacy() {
132  return false;
133  }
134 
142  public static function makeParamBlob( $params ) {
143  return serialize( (array)$params );
144  }
145 
153  public static function extractParams( $blob ) {
154  return unserialize( $blob );
155  }
156 }
157 
164 
172  public static function getSelectQueryData() {
173  $tables = [ 'logging', 'user' ];
174  $fields = [
175  'log_id', 'log_type', 'log_action', 'log_timestamp',
176  'log_user', 'log_user_text',
177  'log_namespace', 'log_title', // unused log_page
178  'log_comment', 'log_params', 'log_deleted',
179  'user_id', 'user_name', 'user_editcount',
180  ];
181 
182  $joins = [
183  // IPs don't have an entry in user table
184  'user' => [ 'LEFT JOIN', 'log_user=user_id' ],
185  ];
186 
187  return [
188  'tables' => $tables,
189  'fields' => $fields,
190  'conds' => [],
191  'options' => [],
192  'join_conds' => $joins,
193  ];
194  }
195 
203  public static function newFromRow( $row ) {
204  $row = (object)$row;
205  if ( isset( $row->rc_logid ) ) {
206  return new RCDatabaseLogEntry( $row );
207  } else {
208  return new self( $row );
209  }
210  }
211 
213  protected $row;
214 
216  protected $performer;
217 
219  protected $params;
220 
222  protected $revId = null;
223 
225  protected $legacy;
226 
227  protected function __construct( $row ) {
228  $this->row = $row;
229  }
230 
236  public function getId() {
237  return (int)$this->row->log_id;
238  }
239 
245  protected function getRawParameters() {
246  return $this->row->log_params;
247  }
248 
249  public function isLegacy() {
250  // This extracts the property
251  $this->getParameters();
252  return $this->legacy;
253  }
254 
255  public function getType() {
256  return $this->row->log_type;
257  }
258 
259  public function getSubtype() {
260  return $this->row->log_action;
261  }
262 
263  public function getParameters() {
264  if ( !isset( $this->params ) ) {
265  $blob = $this->getRawParameters();
266  MediaWiki\suppressWarnings();
268  MediaWiki\restoreWarnings();
269  if ( $params !== false ) {
270  $this->params = $params;
271  $this->legacy = false;
272  } else {
273  $this->params = LogPage::extractParams( $blob );
274  $this->legacy = true;
275  }
276 
277  if ( isset( $this->params['associated_rev_id'] ) ) {
278  $this->revId = $this->params['associated_rev_id'];
279  unset( $this->params['associated_rev_id'] );
280  }
281  }
282 
283  return $this->params;
284  }
285 
286  public function getAssociatedRevId() {
287  // This extracts the property
288  $this->getParameters();
289  return $this->revId;
290  }
291 
292  public function getPerformer() {
293  if ( !$this->performer ) {
294  $userId = (int)$this->row->log_user;
295  if ( $userId !== 0 ) {
296  // logged-in users
297  if ( isset( $this->row->user_name ) ) {
298  $this->performer = User::newFromRow( $this->row );
299  } else {
300  $this->performer = User::newFromId( $userId );
301  }
302  } else {
303  // IP users
304  $userText = $this->row->log_user_text;
305  $this->performer = User::newFromName( $userText, false );
306  }
307  }
308 
309  return $this->performer;
310  }
311 
312  public function getTarget() {
313  $namespace = $this->row->log_namespace;
314  $page = $this->row->log_title;
315  $title = Title::makeTitle( $namespace, $page );
316 
317  return $title;
318  }
319 
320  public function getTimestamp() {
321  return wfTimestamp( TS_MW, $this->row->log_timestamp );
322  }
323 
324  public function getComment() {
325  return $this->row->log_comment;
326  }
327 
328  public function getDeleted() {
329  return $this->row->log_deleted;
330  }
331 }
332 
334 
335  public function getId() {
336  return $this->row->rc_logid;
337  }
338 
339  protected function getRawParameters() {
340  return $this->row->rc_params;
341  }
342 
343  public function getAssociatedRevId() {
344  return $this->row->rc_this_oldid;
345  }
346 
347  public function getType() {
348  return $this->row->rc_log_type;
349  }
350 
351  public function getSubtype() {
352  return $this->row->rc_log_action;
353  }
354 
355  public function getPerformer() {
356  if ( !$this->performer ) {
357  $userId = (int)$this->row->rc_user;
358  if ( $userId !== 0 ) {
359  $this->performer = User::newFromId( $userId );
360  } else {
361  $userText = $this->row->rc_user_text;
362  // Might be an IP, don't validate the username
363  $this->performer = User::newFromName( $userText, false );
364  }
365  }
366 
367  return $this->performer;
368  }
369 
370  public function getTarget() {
371  $namespace = $this->row->rc_namespace;
372  $page = $this->row->rc_title;
373  $title = Title::makeTitle( $namespace, $page );
374 
375  return $title;
376  }
377 
378  public function getTimestamp() {
379  return wfTimestamp( TS_MW, $this->row->rc_timestamp );
380  }
381 
382  public function getComment() {
383  return $this->row->rc_comment;
384  }
385 
386  public function getDeleted() {
387  return $this->row->rc_deleted;
388  }
389 }
390 
398  protected $type;
399 
401  protected $subtype;
402 
404  protected $parameters = [];
405 
407  protected $relations = [];
408 
410  protected $performer;
411 
413  protected $target;
414 
416  protected $timestamp;
417 
419  protected $comment = '';
420 
422  protected $revId = 0;
423 
425  protected $tags = null;
426 
428  protected $deleted;
429 
431  protected $id;
432 
434  protected $isPatrollable = false;
435 
437  protected $legacy = false;
438 
446  public function __construct( $type, $subtype ) {
447  $this->type = $type;
448  $this->subtype = $subtype;
449  }
450 
472  public function setParameters( $parameters ) {
473  $this->parameters = $parameters;
474  }
475 
483  public function setRelations( array $relations ) {
484  $this->relations = $relations;
485  }
486 
493  public function setPerformer( User $performer ) {
494  $this->performer = $performer;
495  }
496 
503  public function setTarget( Title $target ) {
504  $this->target = $target;
505  }
506 
513  public function setTimestamp( $timestamp ) {
514  $this->timestamp = $timestamp;
515  }
516 
523  public function setComment( $comment ) {
524  $this->comment = $comment;
525  }
526 
536  public function setAssociatedRevId( $revId ) {
537  $this->revId = $revId;
538  }
539 
546  public function setTags( $tags ) {
547  if ( is_string( $tags ) ) {
548  $tags = [ $tags ];
549  }
550  $this->tags = $tags;
551  }
552 
562  public function setIsPatrollable( $patrollable ) {
563  $this->isPatrollable = (bool)$patrollable;
564  }
565 
572  public function setLegacy( $legacy ) {
573  $this->legacy = $legacy;
574  }
575 
582  public function setDeleted( $deleted ) {
583  $this->deleted = $deleted;
584  }
585 
593  public function insert( IDatabase $dbw = null ) {
595 
596  $dbw = $dbw ?: wfGetDB( DB_MASTER );
597  $id = $dbw->nextSequenceValue( 'logging_log_id_seq' );
598 
599  if ( $this->timestamp === null ) {
600  $this->timestamp = wfTimestampNow();
601  }
602 
603  // Trim spaces on user supplied text
604  $comment = trim( $this->getComment() );
605 
606  // Truncate for whole multibyte characters.
607  $comment = $wgContLang->truncate( $comment, 255 );
608 
609  $params = $this->getParameters();
611 
612  // Additional fields for which there's no space in the database table schema
613  $revId = $this->getAssociatedRevId();
614  if ( $revId ) {
615  $params['associated_rev_id'] = $revId;
616  $relations['associated_rev_id'] = $revId;
617  }
618 
619  $data = [
620  'log_id' => $id,
621  'log_type' => $this->getType(),
622  'log_action' => $this->getSubtype(),
623  'log_timestamp' => $dbw->timestamp( $this->getTimestamp() ),
624  'log_user' => $this->getPerformer()->getId(),
625  'log_user_text' => $this->getPerformer()->getName(),
626  'log_namespace' => $this->getTarget()->getNamespace(),
627  'log_title' => $this->getTarget()->getDBkey(),
628  'log_page' => $this->getTarget()->getArticleID(),
629  'log_comment' => $comment,
630  'log_params' => LogEntryBase::makeParamBlob( $params ),
631  ];
632  if ( isset( $this->deleted ) ) {
633  $data['log_deleted'] = $this->deleted;
634  }
635 
636  $dbw->insert( 'logging', $data, __METHOD__ );
637  $this->id = !is_null( $id ) ? $id : $dbw->insertId();
638 
639  $rows = [];
640  foreach ( $relations as $tag => $values ) {
641  if ( !strlen( $tag ) ) {
642  throw new MWException( "Got empty log search tag." );
643  }
644 
645  if ( !is_array( $values ) ) {
646  $values = [ $values ];
647  }
648 
649  foreach ( $values as $value ) {
650  $rows[] = [
651  'ls_field' => $tag,
652  'ls_value' => $value,
653  'ls_log_id' => $this->id
654  ];
655  }
656  }
657  if ( count( $rows ) ) {
658  $dbw->insert( 'log_search', $rows, __METHOD__, 'IGNORE' );
659  }
660 
661  return $this->id;
662  }
663 
671  public function getRecentChange( $newId = 0 ) {
672  $formatter = LogFormatter::newFromEntry( $this );
674  $formatter->setContext( $context );
675 
676  $logpage = SpecialPage::getTitleFor( 'Log', $this->getType() );
677  $user = $this->getPerformer();
678  $ip = "";
679  if ( $user->isAnon() ) {
680  // "MediaWiki default" and friends may have
681  // no IP address in their name
682  if ( IP::isIPAddress( $user->getName() ) ) {
683  $ip = $user->getName();
684  }
685  }
686 
688  $this->getTimestamp(),
689  $logpage,
690  $user,
691  $formatter->getPlainActionText(),
692  $ip,
693  $this->getType(),
694  $this->getSubtype(),
695  $this->getTarget(),
696  $this->getComment(),
698  $newId,
699  $formatter->getIRCActionComment(), // Used for IRC feeds
700  $this->getAssociatedRevId(), // Used for e.g. moves and uploads
701  $this->getIsPatrollable()
702  );
703  }
704 
711  public function publish( $newId, $to = 'rcandudp' ) {
713  function () use ( $newId, $to ) {
714  $log = new LogPage( $this->getType() );
715  if ( !$log->isRestricted() ) {
716  $rc = $this->getRecentChange( $newId );
717 
718  if ( $to === 'rc' || $to === 'rcandudp' ) {
719  // save RC, passing tags so they are applied there
720  $tags = $this->getTags();
721  if ( is_null( $tags ) ) {
722  $tags = [];
723  }
724  $rc->addTags( $tags );
725  $rc->save( 'pleasedontudp' );
726  }
727 
728  if ( $to === 'udp' || $to === 'rcandudp' ) {
729  $rc->notifyRCFeeds();
730  }
731 
732  // Log the autopatrol if the log entry is patrollable
733  if ( $this->getIsPatrollable() &&
734  $rc->getAttribute( 'rc_patrolled' ) === 1
735  ) {
736  PatrolLog::record( $rc, true, $this->getPerformer() );
737  }
738  }
739  },
741  wfGetDB( DB_MASTER )
742  );
743  }
744 
745  public function getType() {
746  return $this->type;
747  }
748 
749  public function getSubtype() {
750  return $this->subtype;
751  }
752 
753  public function getParameters() {
754  return $this->parameters;
755  }
756 
760  public function getPerformer() {
761  return $this->performer;
762  }
763 
767  public function getTarget() {
768  return $this->target;
769  }
770 
771  public function getTimestamp() {
772  $ts = $this->timestamp !== null ? $this->timestamp : wfTimestampNow();
773 
774  return wfTimestamp( TS_MW, $ts );
775  }
776 
777  public function getComment() {
778  return $this->comment;
779  }
780 
785  public function getAssociatedRevId() {
786  return $this->revId;
787  }
788 
793  public function getTags() {
794  return $this->tags;
795  }
796 
803  public function getIsPatrollable() {
804  return $this->isPatrollable;
805  }
806 
811  public function isLegacy() {
812  return $this->legacy;
813  }
814 
815  public function getDeleted() {
816  return (int)$this->deleted;
817  }
818 }
ManualLogEntry\setTimestamp
setTimestamp( $timestamp)
Set the timestamp of when the logged action took place.
Definition: LogEntry.php:513
ManualLogEntry\__construct
__construct( $type, $subtype)
Constructor.
Definition: LogEntry.php:446
if
if($IP===false)
Definition: cleanupArchiveUserText.php:4
object
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php For a description of the see design txt $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest object
Definition: globals.txt:25
$context
error also a ContextSource you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
Definition: hooks.txt:2612
User\newFromId
static newFromId( $id)
Static factory method for creation from a given user ID.
Definition: User.php:579
ManualLogEntry\getTarget
getTarget()
Definition: LogEntry.php:767
RCDatabaseLogEntry
Definition: LogEntry.php:333
$tables
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
Definition: hooks.txt:990
RCDatabaseLogEntry\getAssociatedRevId
getAssociatedRevId()
Definition: LogEntry.php:343
ManualLogEntry\$deleted
int $deleted
Deletion state of the log entry.
Definition: LogEntry.php:428
ManualLogEntry\getType
getType()
The main log type.
Definition: LogEntry.php:745
LogEntry\getTimestamp
getTimestamp()
Get the timestamp when the action was executed.
ManualLogEntry\insert
insert(IDatabase $dbw=null)
Insert the entry into the logging table.
Definition: LogEntry.php:593
DatabaseLogEntry\getId
getId()
Returns the unique database id.
Definition: LogEntry.php:236
DatabaseLogEntry\$params
array $params
Parameters for log entry.
Definition: LogEntry.php:219
LogPage\extractParams
static extractParams( $blob)
Extract a parameter array from a blob.
Definition: LogPage.php:428
DatabaseLogEntry\getParameters
getParameters()
Get the extra parameters stored for this message.
Definition: LogEntry.php:263
LogEntry\getParameters
getParameters()
Get the extra parameters stored for this message.
captcha-old.count
count
Definition: captcha-old.py:225
PatrolLog\record
static record( $rc, $auto=false, User $user=null, $tags=null)
Record a log event for a change being patrolled.
Definition: PatrolLog.php:41
LogEntry\isDeleted
isDeleted( $field)
ManualLogEntry\setAssociatedRevId
setAssociatedRevId( $revId)
Set an associated revision id.
Definition: LogEntry.php:536
ManualLogEntry\getParameters
getParameters()
Get the extra parameters stored for this message.
Definition: LogEntry.php:753
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:1994
LogEntryBase\isLegacy
isLegacy()
Whether the parameters for this log are stored in new or old format.
Definition: LogEntry.php:131
DatabaseLogEntry\getSelectQueryData
static getSelectQueryData()
Returns array of information that is needed for querying log entries.
Definition: LogEntry.php:172
RCDatabaseLogEntry\getRawParameters
getRawParameters()
Returns whatever is stored in the database field.
Definition: LogEntry.php:339
RCDatabaseLogEntry\getSubtype
getSubtype()
The log subtype.
Definition: LogEntry.php:351
LogEntry\getTarget
getTarget()
Get the target page of this action.
use
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition: MIT-LICENSE.txt:10
$user
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Definition: hooks.txt:246
LogEntry\getComment
getComment()
Get the user provided comment.
unserialize
unserialize( $serialized)
Definition: ApiMessage.php:185
$params
$params
Definition: styleTest.css.php:40
serialize
serialize()
Definition: ApiMessage.php:177
ManualLogEntry\getComment
getComment()
Get the user provided comment.
Definition: LogEntry.php:777
User\newFromName
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
Definition: User.php:556
DatabaseLogEntry\getComment
getComment()
Get the user provided comment.
Definition: LogEntry.php:324
RequestContext\newExtraneousContext
static newExtraneousContext(Title $title, $request=[])
Create a new extraneous context.
Definition: RequestContext.php:638
LogEntry\getFullType
getFullType()
The full logtype in format maintype/subtype.
SpecialPage\getTitleFor
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
Definition: SpecialPage.php:82
ManualLogEntry\setRelations
setRelations(array $relations)
Declare arbitrary tag/value relations to this log entry.
Definition: LogEntry.php:483
ManualLogEntry\setTarget
setTarget(Title $target)
Set the title of the object changed.
Definition: LogEntry.php:503
User\newFromRow
static newFromRow( $row, $data=null)
Create a new user object from a user row.
Definition: User.php:643
DatabaseLogEntry\getSubtype
getSubtype()
The log subtype.
Definition: LogEntry.php:259
ManualLogEntry\getTimestamp
getTimestamp()
Get the timestamp when the action was executed.
Definition: LogEntry.php:771
ManualLogEntry\$legacy
bool $legacy
Whether this is a legacy log entry.
Definition: LogEntry.php:437
php
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
DatabaseLogEntry\getTimestamp
getTimestamp()
Get the timestamp when the action was executed.
Definition: LogEntry.php:320
Wikimedia\Rdbms\IDatabase
Basic database interface for live and lazy-loaded relation database handles.
Definition: IDatabase.php:40
ManualLogEntry\setTags
setTags( $tags)
Set change tags for the log entry.
Definition: LogEntry.php:546
LogEntry\getType
getType()
The main log type.
RCDatabaseLogEntry\getId
getId()
Returns the unique database id.
Definition: LogEntry.php:335
RCDatabaseLogEntry\getTimestamp
getTimestamp()
Get the timestamp when the action was executed.
Definition: LogEntry.php:378
ManualLogEntry\$comment
string $comment
Comment for the log entry.
Definition: LogEntry.php:419
DeferredUpdates\addCallableUpdate
static addCallableUpdate( $callable, $stage=self::POSTSEND, IDatabase $dbw=null)
Add a callable update.
Definition: DeferredUpdates.php:111
ManualLogEntry\$parameters
array $parameters
Parameters for log entry.
Definition: LogEntry.php:404
ManualLogEntry\getRecentChange
getRecentChange( $newId=0)
Get a RecentChanges object for the log entry.
Definition: LogEntry.php:671
RCDatabaseLogEntry\getTarget
getTarget()
Get the target page of this action.
Definition: LogEntry.php:370
ManualLogEntry\isLegacy
isLegacy()
Definition: LogEntry.php:811
MWException
MediaWiki exception.
Definition: MWException.php:26
$title
namespace and then decline to actually register it file or subcat img or subcat $title
Definition: hooks.txt:934
DatabaseLogEntry\newFromRow
static newFromRow( $row)
Constructs new LogEntry from database result row.
Definition: LogEntry.php:203
ManualLogEntry\setComment
setComment( $comment)
Set a comment associated with the action being logged.
Definition: LogEntry.php:523
ManualLogEntry\$id
int $id
ID of the log entry.
Definition: LogEntry.php:431
$blob
$blob
Definition: testCompression.php:63
LogEntry
Interface for log entries.
Definition: LogEntry.php:38
wfGetDB
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3060
$page
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values before the output is cached $page
Definition: hooks.txt:2536
$tag
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist and Watchlist you will want to construct new ChangesListBooleanFilter or ChangesListStringOptionsFilter objects When constructing you specify which group they belong to You can reuse existing or create your you must register them with $special registerFilterGroup removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books $tag
Definition: hooks.txt:1028
DatabaseLogEntry\getType
getType()
The main log type.
Definition: LogEntry.php:255
LogEntryBase\isDeleted
isDeleted( $field)
Definition: LogEntry.php:121
LogPage
Class to simplify the use of log pages.
Definition: LogPage.php:31
RCDatabaseLogEntry\getComment
getComment()
Get the user provided comment.
Definition: LogEntry.php:382
DeferredUpdates\POSTSEND
const POSTSEND
Definition: DeferredUpdates.php:61
ManualLogEntry\getSubtype
getSubtype()
The log subtype.
Definition: LogEntry.php:749
Title\makeTitle
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:514
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
wfTimestampNow
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
Definition: GlobalFunctions.php:2023
DB_MASTER
const DB_MASTER
Definition: defines.php:26
ManualLogEntry\$subtype
string $subtype
Sub type of log entry.
Definition: LogEntry.php:401
ManualLogEntry\setParameters
setParameters( $parameters)
Set extra log parameters.
Definition: LogEntry.php:472
ManualLogEntry\publish
publish( $newId, $to='rcandudp')
Publish the log entry.
Definition: LogEntry.php:711
ManualLogEntry\$relations
array $relations
Definition: LogEntry.php:407
LogEntryBase
Extends the LogEntryInterface with some basic functionality.
Definition: LogEntry.php:115
LogEntry\getDeleted
getDeleted()
Get the access restriction.
ManualLogEntry\setIsPatrollable
setIsPatrollable( $patrollable)
Set whether this log entry should be made patrollable This shouldn't depend on config,...
Definition: LogEntry.php:562
LogEntryBase\extractParams
static extractParams( $blob)
Extract a parameter array from a blob.
Definition: LogEntry.php:153
$value
$value
Definition: styleTest.css.php:45
ManualLogEntry\setDeleted
setDeleted( $deleted)
Set the 'deleted' flag.
Definition: LogEntry.php:582
DatabaseLogEntry\getPerformer
getPerformer()
Get the user for performed this action.
Definition: LogEntry.php:292
ManualLogEntry\$timestamp
string $timestamp
Timestamp of creation of the log entry.
Definition: LogEntry.php:416
LogEntryBase\getFullType
getFullType()
The full logtype in format maintype/subtype.
Definition: LogEntry.php:117
RCDatabaseLogEntry\getType
getType()
The main log type.
Definition: LogEntry.php:347
ManualLogEntry\getTags
getTags()
Definition: LogEntry.php:793
LogEntry\getSubtype
getSubtype()
The log subtype.
ManualLogEntry\getPerformer
getPerformer()
Definition: LogEntry.php:760
Title
Represents a title within MediaWiki.
Definition: Title.php:39
type
This document describes the state of Postgres support in and is fairly well maintained The main code is very well while extensions are very hit and miss it is probably the most supported database after MySQL Much of the work in making MediaWiki database agnostic came about through the work of creating Postgres as and are nearing end of but without copying over all the usage comments General notes on the but these can almost always be programmed around *Although Postgres has a true BOOLEAN type
Definition: postgres.txt:22
ManualLogEntry\setPerformer
setPerformer(User $performer)
Set the user that performed the action being logged.
Definition: LogEntry.php:493
DatabaseLogEntry\__construct
__construct( $row)
Definition: LogEntry.php:227
DatabaseLogEntry\$revId
int $revId
A rev id associated to the log entry.
Definition: LogEntry.php:222
DatabaseLogEntry\$legacy
bool $legacy
Whether the parameters for this log entry are stored in new or old format.
Definition: LogEntry.php:225
ManualLogEntry\getDeleted
getDeleted()
Get the access restriction.
Definition: LogEntry.php:815
RecentChange\newLogEntry
static newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId=0, $actionCommentIRC='', $revId=0, $isPatrollable=false)
Definition: RecentChange.php:748
LogEntryBase\makeParamBlob
static makeParamBlob( $params)
Create a blob from a parameter array.
Definition: LogEntry.php:142
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
ManualLogEntry\$revId
int $revId
A rev id associated to the log entry.
Definition: LogEntry.php:422
DatabaseLogEntry
This class wraps around database result row.
Definition: LogEntry.php:163
ManualLogEntry\getIsPatrollable
getIsPatrollable()
Whether this log entry is patrollable.
Definition: LogEntry.php:803
DatabaseLogEntry\isLegacy
isLegacy()
Whether the parameters for this log are stored in new or old format.
Definition: LogEntry.php:249
ManualLogEntry\$target
Title $target
Target title for the log entry.
Definition: LogEntry.php:413
ManualLogEntry
Class for creating log entries manually, to inject them into the database.
Definition: LogEntry.php:396
RCDatabaseLogEntry\getPerformer
getPerformer()
Get the user for performed this action.
Definition: LogEntry.php:355
DatabaseLogEntry\getTarget
getTarget()
Get the target page of this action.
Definition: LogEntry.php:312
ManualLogEntry\setLegacy
setLegacy( $legacy)
Set the 'legacy' flag.
Definition: LogEntry.php:572
DatabaseLogEntry\$row
stdClass $row
Database result row.
Definition: LogEntry.php:213
ManualLogEntry\getAssociatedRevId
getAssociatedRevId()
Definition: LogEntry.php:785
RCDatabaseLogEntry\getDeleted
getDeleted()
Get the access restriction.
Definition: LogEntry.php:386
DatabaseLogEntry\getDeleted
getDeleted()
Get the access restriction.
Definition: LogEntry.php:328
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:50
LogEntry\getPerformer
getPerformer()
Get the user for performed this action.
DatabaseLogEntry\getAssociatedRevId
getAssociatedRevId()
Definition: LogEntry.php:286
DatabaseLogEntry\$performer
User $performer
Definition: LogEntry.php:216
DatabaseLogEntry\getRawParameters
getRawParameters()
Returns whatever is stored in the database field.
Definition: LogEntry.php:245
ManualLogEntry\$type
string $type
Type of log entry.
Definition: LogEntry.php:398
ManualLogEntry\$isPatrollable
bool $isPatrollable
Can this log entry be patrolled?
Definition: LogEntry.php:434
ManualLogEntry\$performer
User $performer
Performer of the action for the log entry.
Definition: LogEntry.php:410
IP\isIPAddress
static isIPAddress( $ip)
Determine if a string is as valid IP address or network (CIDR prefix).
Definition: IP.php:79
array
the array() calling protocol came about after MediaWiki 1.4rc1.
ManualLogEntry\$tags
array $tags
Change tags add to the log entry.
Definition: LogEntry.php:425
$wgContLang
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
Definition: design.txt:56
LogFormatter\newFromEntry
static newFromEntry(LogEntry $entry)
Constructs a new formatter suitable for given entry.
Definition: LogFormatter.php:48