summaryrefslogtreecommitdiff
path: root/includes/logging/LogEntry.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-06-04 07:31:04 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-06-04 07:58:39 +0200
commitf6d65e533c62f6deb21342d4901ece24497b433e (patch)
treef28adf0362d14bcd448f7b65a7aaf38650f923aa /includes/logging/LogEntry.php
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'includes/logging/LogEntry.php')
-rw-r--r--includes/logging/LogEntry.php38
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;
}