From d188ec34bb4e255ab2c45f9acfe3a79f3f056646 Mon Sep 17 00:00:00 2001 From: aude Date: Thu, 11 Feb 2016 15:40:42 +0100 Subject: [PATCH] Make unused variable optional in ChangesList::insertDiffHist $unpatrolled is unused in the method, so make it optional, and then uses of it can be removed. I realize it would do no harm to remove it completely, even if a few (2 that I know of) extensions still pass the variable to the method, but think this is nicer way. Change-Id: Idbe6f00e9eb40db6a28de76fca0aea7c17b75656 --- includes/changes/ChangesList.php | 4 ++-- includes/changes/OldChangesList.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 73c7548b4c..39dedd4b0b 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -316,9 +316,9 @@ class ChangesList extends ContextSource { /** * @param string $s HTML to update * @param RecentChange $rc - * @param bool $unpatrolled + * @param bool|null $unpatrolled Unused variable, since 1.27. */ - public function insertDiffHist( &$s, &$rc, $unpatrolled ) { + public function insertDiffHist( &$s, &$rc, $unpatrolled = null ) { # Diff link if ( $rc->mAttribs['rc_type'] == RC_NEW || diff --git a/includes/changes/OldChangesList.php b/includes/changes/OldChangesList.php index 6f05dc4b54..2845c5c52d 100644 --- a/includes/changes/OldChangesList.php +++ b/includes/changes/OldChangesList.php @@ -92,7 +92,7 @@ class OldChangesList extends ChangesList { } // Regular entries } else { - $this->insertDiffHist( $html, $rc, $unpatrolled ); + $this->insertDiffHist( $html, $rc ); # M, N, b and ! (minor, new, bot and unpatrolled) $html .= $this->recentChangesFlags( array( -- 2.20.1