mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 14:13:54 +00:00
Merge "Move mCounter property from AbuseFilterViewExamine to AbuseFilterExaminePager"
This commit is contained in:
commit
bec7c44d12
|
@ -6,10 +6,6 @@ use MediaWiki\MediaWikiServices;
|
|||
use MediaWiki\Revision\RevisionRecord;
|
||||
|
||||
class AbuseFilterViewExamine extends AbuseFilterView {
|
||||
/**
|
||||
* @var int Line number of the row, see RecentChange::$counter
|
||||
*/
|
||||
public $mCounter;
|
||||
/**
|
||||
* @var string The user whose entries we're examinating
|
||||
*/
|
||||
|
@ -98,16 +94,13 @@ class AbuseFilterViewExamine extends AbuseFilterView {
|
|||
*/
|
||||
public function showResults() {
|
||||
$changesList = new AbuseFilterChangesList( $this->getSkin(), $this->mTestFilter );
|
||||
$output = $changesList->beginRecentChangesList();
|
||||
$this->mCounter = 1;
|
||||
|
||||
$pager = new AbuseFilterExaminePager( $this, $changesList );
|
||||
|
||||
$output .= $pager->getNavigationBar() .
|
||||
$pager->getBody() .
|
||||
$pager->getNavigationBar();
|
||||
|
||||
$output .= $changesList->endRecentChangesList();
|
||||
$output = $changesList->beginRecentChangesList()
|
||||
. $pager->getNavigationBar()
|
||||
. $pager->getBody()
|
||||
. $pager->getNavigationBar()
|
||||
. $changesList->endRecentChangesList();
|
||||
|
||||
$this->getOutput()->addHTML( $output );
|
||||
}
|
||||
|
|
|
@ -9,6 +9,10 @@ class AbuseFilterExaminePager extends ReverseChronologicalPager {
|
|||
* @var AbuseFilterViewExamine The associated view
|
||||
*/
|
||||
public $mPage;
|
||||
/**
|
||||
* @var int Line number of the row, see RecentChange::$counter
|
||||
*/
|
||||
public $rcCounter;
|
||||
|
||||
/**
|
||||
* @param AbuseFilterViewExamine $page
|
||||
|
@ -18,6 +22,7 @@ class AbuseFilterExaminePager extends ReverseChronologicalPager {
|
|||
parent::__construct();
|
||||
$this->mChangesList = $changesList;
|
||||
$this->mPage = $page;
|
||||
$this->rcCounter = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,7 +67,7 @@ class AbuseFilterExaminePager extends ReverseChronologicalPager {
|
|||
*/
|
||||
public function formatRow( $row ) {
|
||||
$rc = RecentChange::newFromRow( $row );
|
||||
$rc->counter = $this->mPage->mCounter++;
|
||||
$rc->counter = $this->rcCounter++;
|
||||
return $this->mChangesList->recentChangesLine( $rc, false );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue