From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- includes/logging/LogEntry.php | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'includes/logging/LogEntry.php') 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' * ); * @@ -458,6 +462,16 @@ class ManualLogEntry extends LogEntryBase { $this->comment = $comment; } + /** + * Set the 'legacy' flag + * + * @since 1.25 + * @param bool $legacy + */ + public function setLegacy( $legacy ) { + $this->legacy = $legacy; + } + /** * TODO: document * @@ -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; } -- cgit v1.2.3-54-g00ecf