Stop requiring the Skin interface in AbuseFilterChangesList

IContextSource is now enough for ChangesList.

Change-Id: Iebb525227efe841a17c799d460d352017a2cfc4f
This commit is contained in:
Matěj Suchánek 2021-09-25 10:28:50 +02:00
parent 026f8a44cd
commit 632b39f8ca
3 changed files with 6 additions and 6 deletions

View file

@ -3,12 +3,12 @@
namespace MediaWiki\Extension\AbuseFilter;
use HtmlArmor;
use IContextSource;
use Linker;
use LogFormatter;
use MediaWiki\Revision\RevisionRecord;
use OldChangesList;
use RecentChange;
use Skin;
use SpecialPage;
class AbuseFilterChangesList extends OldChangesList {
@ -19,11 +19,11 @@ class AbuseFilterChangesList extends OldChangesList {
private $testFilter;
/**
* @param Skin $skin
* @param IContextSource $context
* @param string $testFilter
*/
public function __construct( Skin $skin, $testFilter ) {
parent::__construct( $skin );
public function __construct( IContextSource $context, $testFilter ) {
parent::__construct( $context );
$this->testFilter = $testFilter;
}

View file

@ -175,7 +175,7 @@ class AbuseFilterViewExamine extends AbuseFilterView {
* @return bool
*/
public function showResults( array $formData, HTMLForm $form ): bool {
$changesList = new AbuseFilterChangesList( $this->getSkin(), $this->mTestFilter );
$changesList = new AbuseFilterChangesList( $this->getContext(), $this->mTestFilter );
$pager = new AbuseFilterExaminePager( $this, $changesList );
$output = $changesList->beginRecentChangesList()

View file

@ -266,7 +266,7 @@ class AbuseFilterViewTestBatch extends AbuseFilterView {
);
// Get our ChangesList
$changesList = new AbuseFilterChangesList( $this->getSkin(), $this->testPattern );
$changesList = new AbuseFilterChangesList( $this->getContext(), $this->testPattern );
// Note, we're initializing some rows that will later be discarded. Hopefully this won't have any overhead.
$changesList->initChangesListRows( $res );
$output = $changesList->beginRecentChangesList();