Hide HHVM tag on Special:{Contributions,RecentChanges,...}
authorOri Livneh <ori@wikimedia.org>
Sat, 8 Nov 2014 23:28:30 +0000 (15:28 -0800)
committerBryanDavis <bdavis@wikimedia.org>
Mon, 10 Nov 2014 18:08:34 +0000 (18:08 +0000)
The coming weeks will see HHVM rolled out to progressively more users, which
will make the HHVM change tag even more ubiquitous than it is today. A small
but significant number of users have said that they find the tag irritating or
confusing, so let's temporarily hide it from the interface. (We only need this
until the migration is complete, because after that we can just go back and
delete the tag from the database.)

With this patch, the HHVM tag is not shown in change lists, but you can still
filter on it.

This could be implemented as a proper feature, configurable by adding items to
a $wgHiddenChangeTags array. I decided against doing that because I'm uneasy
about its application beyond this particular case.

My plan is to cherry-pick this change to the production branches (if it gets
merged) and leave it in master until the tag is expunged. This will happen long
before the 1.25 branch date of April 15, 2015.

Bug: 73181
Change-Id: Iec9befeba4fe77df0ddd4f056d82b3d4e2dd2199

includes/ChangeTags.php

index a3c2360..87c6ce5 100644 (file)
@@ -34,13 +34,17 @@ class ChangeTags {
        public static function formatSummaryRow( $tags, $page ) {
                global $wgLang;
 
+               $tags = explode( ',', $tags );
+
+               // XXX(Ori Livneh, 2014-11-08): remove once bug 73181 is resolved.
+               $tags = array_diff( $tags, array( 'HHVM', '' ) );
+
                if ( !$tags ) {
                        return array( '', array() );
                }
 
                $classes = array();
 
-               $tags = explode( ',', $tags );
                $displayTags = array();
                foreach ( $tags as $tag ) {
                        $displayTags[] = Xml::tags(