diff options
Diffstat (limited to 'includes/logging/LogEntry.php')
-rw-r--r-- | includes/logging/LogEntry.php | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php index 46c55157..66c2bde1 100644 --- a/includes/logging/LogEntry.php +++ b/includes/logging/LogEntry.php @@ -370,6 +370,9 @@ class ManualLogEntry extends LogEntryBase { /** @var int ID of the log entry */ protected $id; + /** @var bool Whether this is a legacy log entry */ + protected $legacy = false; + /** * Constructor. * @@ -385,13 +388,14 @@ class ManualLogEntry extends LogEntryBase { /** * Set extra log parameters. - * You can pass params to the log action message - * by prefixing the keys with a number and colon. - * The numbering should start with number 4, the - * first three parameters are hardcoded for every - * message. Example: + * + * You can pass params to the log action message by prefixing the keys with + * a number and optional type, using colons to separate the fields. The + * numbering should start with number 4, the first three parameters are + * hardcoded for every message. Example: * $entry->setParameters( - * '4:color' => 'blue', + * '4::color' => 'blue', + * '5:number:count' => 3000, * 'animal' => 'dog' * ); * @@ -459,6 +463,16 @@ class ManualLogEntry extends LogEntryBase { } /** + * Set the 'legacy' flag + * + * @since 1.25 + * @param bool $legacy + */ + public function setLegacy( $legacy ) { + $this->legacy = $legacy; + } + + /** * TODO: document * * @since 1.19 @@ -533,10 +547,6 @@ class ManualLogEntry extends LogEntryBase { $dbw->insert( 'log_search', $rows, __METHOD__, 'IGNORE' ); } - // Update any bloom filter cache - $member = $this->getTarget()->getNamespace() . ':' . $this->getTarget()->getDBkey(); - BloomCache::get( 'main' )->insert( wfWikiId(), 'TitleHasLogs', $member ); - return $this->id; } @@ -640,6 +650,14 @@ class ManualLogEntry extends LogEntryBase { return $this->comment; } + /** + * @since 1.25 + * @return bool + */ + public function isLegacy() { + return $this->legacy; + } + public function getDeleted() { return (int)$this->deleted; } |