Make ChangesListSpecialPage::getLegend non static
authorReedy <reedy@wikimedia.org>
Tue, 19 Jan 2016 20:10:16 +0000 (20:10 +0000)
committerFlorianschmidtwelzow <florian.schmidt.stargatewissen@gmail.com>
Wed, 20 Jan 2016 06:41:44 +0000 (06:41 +0000)
Change-Id: I1044c0f019daf27c5ce83d6c1363aaab499115bc

includes/specialpage/ChangesListSpecialPage.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialWatchlist.php

index 74842aa..13dffb4 100644 (file)
@@ -421,13 +421,11 @@ abstract class ChangesListSpecialPage extends SpecialPage {
 
        /**
         * Return the legend displayed within the fieldset
-        * @todo This should not be static, then we can drop the parameter
-        * @todo Not called by anything, should be called by doHeader()
         *
-        * @param IContextSource $context The object available as $this in non-static functions
         * @return string
         */
-       public static function makeLegend( IContextSource $context ) {
+       public function makeLegend() {
+               $context = $this->getContext();
                $user = $context->getUser();
                # The legend showing what the letters and stuff mean
                $legend = Html::openElement( 'dl' ) . "\n";
index 4848d01..f030231 100644 (file)
@@ -396,7 +396,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                $nondefaults = $opts->getChangedValues();
 
                $panel = array();
-               $panel[] = self::makeLegend( $this->getContext() );
+               $panel[] = $this->makeLegend();
                $panel[] = $this->optionsPanel( $defaults, $nondefaults, $numRows );
                $panel[] = '<hr />';
 
index c894a79..7ab6578 100644 (file)
@@ -605,7 +605,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                        array( 'id' => 'mw-watchlist-options' )
                );
 
-               $form .= SpecialRecentChanges::makeLegend( $this->getContext() );
+               $form .= $this->makeLegend();
 
                $this->getOutput()->addHTML( $form );
        }