summaryrefslogtreecommitdiff
path: root/includes/logging/LogEntry.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
commit1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch)
treef1fdd326034e05177596851be6a7127615d81498 /includes/logging/LogEntry.php
parent9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff)
parentf6d65e533c62f6deb21342d4901ece24497b433e (diff)
Merge commit 'f6d65'
# Conflicts: # skins/ArchLinux/ArchLinux.php
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;
}