Add new mw-contributions-current css class to Special:Contributions
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Thu, 24 Mar 2016 17:17:17 +0000 (18:17 +0100)
committerFlorian <florian.schmidt.stargatewissen@gmail.com>
Tue, 5 Jul 2016 19:44:58 +0000 (21:44 +0200)
If the current revision of a page, where a user contributed to, is the
revision of this user ("current"), add the new css class
mw-contributions-current to the li-element to allow styling the whole
line differently.

Bug: T130824
Change-Id: I556b374585523a7c51278c2dc83bb03fd3b0ee33

includes/specials/pagers/ContribsPager.php

index f4f2748..fe0b4fe 100644 (file)
@@ -371,8 +371,9 @@ class ContribsPager extends ReverseChronologicalPager {
                        # Mark current revisions
                        $topmarktext = '';
                        $user = $this->getUser();
-                       if ( $row->rev_id == $row->page_latest ) {
+                       if ( $row->rev_id === $row->page_latest ) {
                                $topmarktext .= '<span class="mw-uctop">' . $this->messages['uctop'] . '</span>';
+                               $classes[] = 'mw-contributions-current';
                                # Add rollback link
                                if ( !$row->page_is_new && $page->quickUserCan( 'rollback', $user )
                                        && $page->quickUserCan( 'edit', $user )