From c2a9f88a80e117ee7eb6675fda30ac6c18d27292 Mon Sep 17 00:00:00 2001 From: Reedy Date: Tue, 19 Jan 2016 20:10:16 +0000 Subject: [PATCH] Make ChangesListSpecialPage::getLegend non static Change-Id: I1044c0f019daf27c5ce83d6c1363aaab499115bc --- includes/specialpage/ChangesListSpecialPage.php | 6 ++---- includes/specials/SpecialRecentchanges.php | 2 +- includes/specials/SpecialWatchlist.php | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 74842aab48..13dffb46ae 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -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"; diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 4848d01141..f030231e77 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -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[] = '
'; diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index c894a79312..7ab657895b 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -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 ); } -- 2.20.1