From d691e020222a7d431e08997926a6c804d6907588 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 18 Jan 2016 17:59:01 +0100 Subject: [PATCH] TagLogFormatter: For log entries changing both revid and logid tags, prefer revid After 68cc94540d1d6f84b267ab742ce8ff3a46e3ec2f, it's possible for a single user action to add/remove tags to both a log entry and an associated page revision (for example for file uploads). I think we should consider the revision to be the "primary" source of information. (Even better, we could display both. But that seems like a bit more work and I'm not sure if it'd be helpful.) Change-Id: I3c1770346bc559b96c39d0ec40b2375954681d15 --- includes/logging/TagLogFormatter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/logging/TagLogFormatter.php b/includes/logging/TagLogFormatter.php index 5a58c3317e..b62bcb4db8 100644 --- a/includes/logging/TagLogFormatter.php +++ b/includes/logging/TagLogFormatter.php @@ -38,10 +38,10 @@ class TagLogFormatter extends LogFormatter { $remove = ( isset( $params[8] ) && isset( $params[8]['num'] ) && $params[8]['num'] ); $key .= ( $remove ? ( $add ? '' : '-remove' ) : '-add' ); - if ( isset( $params[4] ) && $params[4] ) { - $key .= '-logentry'; - } else { + if ( isset( $params[3] ) && $params[3] ) { $key .= '-revision'; + } else { + $key .= '-logentry'; } return $key; -- 2.20.1