Merge "Fix Postgres support"
[lhc/web/wiklou.git] / includes / specials / SpecialAutoblockList.php
index dcb2444..bf13865 100644 (file)
@@ -78,6 +78,7 @@ class SpecialAutoblockList extends SpecialPage {
                        ->prepareForm()
                        ->displayForm( false );
 
+               $this->showTotal( $pager );
                $this->showList( $pager );
        }
 
@@ -97,6 +98,20 @@ class SpecialAutoblockList extends SpecialPage {
                return new BlockListPager( $this, $conds );
        }
 
+       /**
+        * Show total number of autoblocks on top of the table
+        *
+        * @param BlockListPager $pager The BlockListPager instance for this page
+        */
+       protected function showTotal( BlockListPager $pager ) {
+               $out = $this->getOutput();
+               $out->addHTML(
+                       Html::element( 'div', [ 'style' => 'font-weight: bold;' ],
+                               $this->msg( 'autoblocklist-total-autoblocks', $pager->getTotalAutoblocks() )->parse() )
+                       . "\n"
+               );
+       }
+
        /**
         * Show the list of blocked accounts matching the actual filter.
         * @param BlockListPager $pager The BlockListPager instance for this page