diff options
author | jenkins-bot <jenkins-bot@gerrit.wikimedia.org> | 2021-03-01 22:00:00 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2021-03-01 22:00:00 +0000 |
commit | aee3b076ebb26a0e78623a0db7140f3a640b3e86 (patch) | |
tree | f6936b950c2521d028f1c47f400ad62dce4f0144 /includes/logging | |
parent | 4ca69110af23a1d346b4e6c6ece4791a38ebe959 (diff) | |
parent | a89ea93bea7a8744c82e6a4e2b06d9ce0a89fb88 (diff) | |
download | mediawikicore-aee3b076ebb26a0e78623a0db7140f3a640b3e86.tar.gz mediawikicore-aee3b076ebb26a0e78623a0db7140f3a640b3e86.zip |
Merge "Deprecate LogEntry::getPerformer in favor of ::getPerformerIdentity"
Diffstat (limited to 'includes/logging')
-rw-r--r-- | includes/logging/DatabaseLogEntry.php | 9 | ||||
-rw-r--r-- | includes/logging/ManualLogEntry.php | 1 | ||||
-rw-r--r-- | includes/logging/RCDatabaseLogEntry.php | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/includes/logging/DatabaseLogEntry.php b/includes/logging/DatabaseLogEntry.php index 659a6e51755d..09907ad72b5f 100644 --- a/includes/logging/DatabaseLogEntry.php +++ b/includes/logging/DatabaseLogEntry.php @@ -191,7 +191,7 @@ class DatabaseLogEntry extends LogEntryBase { return $this->revId; } - public function getPerformer() { + protected function getPerformerUser(): User { if ( !$this->performer ) { $actorId = isset( $this->row->log_actor ) ? (int)$this->row->log_actor : 0; $userId = (int)$this->row->log_user; @@ -214,8 +214,13 @@ class DatabaseLogEntry extends LogEntryBase { return $this->performer; } + public function getPerformer() { + wfDeprecated( __METHOD__, '1.36' ); + return $this->getPerformerUser(); + } + public function getPerformerIdentity(): UserIdentity { - return $this->getPerformer(); + return $this->getPerformerUser(); } public function getTarget() { diff --git a/includes/logging/ManualLogEntry.php b/includes/logging/ManualLogEntry.php index da4e6218ad98..a803b0d734d2 100644 --- a/includes/logging/ManualLogEntry.php +++ b/includes/logging/ManualLogEntry.php @@ -457,6 +457,7 @@ class ManualLogEntry extends LogEntryBase implements Taggable { * @return User */ public function getPerformer() { + wfDeprecated( __METHOD__, '1.36' ); return User::newFromIdentity( $this->performer ); } diff --git a/includes/logging/RCDatabaseLogEntry.php b/includes/logging/RCDatabaseLogEntry.php index c811513f918f..e0408e75cbe0 100644 --- a/includes/logging/RCDatabaseLogEntry.php +++ b/includes/logging/RCDatabaseLogEntry.php @@ -63,7 +63,7 @@ class RCDatabaseLogEntry extends DatabaseLogEntry { return $this->row->rc_log_action; } - public function getPerformer() { + protected function getPerformerUser(): User { if ( !$this->performer ) { $actorId = isset( $this->row->rc_actor ) ? (int)$this->row->rc_actor : 0; $userId = (int)$this->row->rc_user; |