return;
}
+ # setup BlockListPager here to get the actual default Limit
+ $pager = $this->getBlockListPager();
+
# Just show the block list
$fields = array(
'Target' => array(
$lang->formatNum( 500 ) => 500,
),
'name' => 'limit',
- 'default' => 50,
+ 'default' => $pager->getLimit(),
),
);
$context = new DerivativeContext( $this->getContext() );
$form->prepareForm();
$form->displayForm( '' );
- $this->showList();
+ $this->showList( $pager );
}
- function showList() {
+ /**
+ * Setup a new BlockListPager instance.
+ * @return BlockListPager
+ */
+ protected function getBlockListPager() {
$conds = array();
# Is the user allowed to see hidden blocks?
if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
$conds[] = "ipb_range_end = ipb_range_start";
}
+ return new BlockListPager( $this, $conds );
+ }
+
+ /**
+ * Show the list of blocked accounts matching the actual filter.
+ * @param BlockListPager $pager The BlockListPager instance for this page
+ */
+ protected function showList( BlockListPager $pager ) {
+ $out = $this->getOutput();
+
# Check for other blocks, i.e. global/tor blocks
$otherBlockLink = array();
Hooks::run( 'OtherBlockLogLink', array( &$otherBlockLink, $this->target ) );
- $out = $this->getOutput();
-
# Show additional header for the local block only when other blocks exists.
# Not necessary in a standard installation without such extensions enabled
if ( count( $otherBlockLink ) ) {
);
}
- $pager = new BlockListPager( $this, $conds );
if ( $pager->getNumRows() ) {
$out->addParserOutputContent( $pager->getFullOutput() );
} elseif ( $this->target ) {