From: Bartosz DziewoƄski Date: Mon, 18 Jan 2016 16:59:01 +0000 (+0100) Subject: TagLogFormatter: For log entries changing both revid and logid tags, prefer revid X-Git-Tag: 1.31.0-rc.0~8175^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=d691e020222a7d431e08997926a6c804d6907588;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;