For rows added by the SpecialStatsAddExtra hook, add an HTML id of "mw-" plus the...
authorKunal Mehta <legoktm@gmail.com>
Tue, 30 Jul 2013 00:58:30 +0000 (17:58 -0700)
committerLegoktm <legoktm.wikipedia@gmail.com>
Wed, 31 Jul 2013 04:43:39 +0000 (04:43 +0000)
This will allow for the row to be easily selected via CSS, so extensions
can easily point the user at the relevant row(s).

Change-Id: Ib93e05d1ef89666ddcb132b5eb4b620b160b5565

includes/specials/SpecialStatistics.php

index 612ba84..f26d1a6 100644 (file)
@@ -301,7 +301,7 @@ class SpecialStatistics extends SpecialPage {
                                        $name = $this->msg( $key )->parse();
                                        $number = htmlspecialchars( $value );
 
-                                       $return .= $this->formatRow( $name, $this->getLanguage()->formatNum( $number ), array( 'class' => 'mw-statistics-hook' ) );
+                                       $return .= $this->formatRow( $name, $this->getLanguage()->formatNum( $number ), array( 'class' => 'mw-statistics-hook', 'id' => 'mw-' . $key ) );
                                }
                        } else {
                                // Create the legacy header only once