Merge "libs/Message: Improve documentation"
[lhc/web/wiklou.git] / includes / pager / TablePager.php
index 36ed9aa..f611699 100644 (file)
@@ -35,6 +35,10 @@ abstract class TablePager extends IndexPager {
        protected $mCurrentRow;
 
        public function __construct( IContextSource $context = null, LinkRenderer $linkRenderer = null ) {
+               if ( $context ) {
+                       $this->setContext( $context );
+               }
+
                $this->mSort = $this->getRequest()->getText( 'sort' );
                if ( !array_key_exists( $this->mSort, $this->getFieldNames() )
                        || !$this->isFieldSortable( $this->mSort )
@@ -48,7 +52,7 @@ abstract class TablePager extends IndexPager {
                } /* Else leave it at whatever the class default is */
 
                // Parent constructor needs mSort set, so we call it last
-               parent::__construct( $context, $linkRenderer );
+               parent::__construct( null, $linkRenderer );
        }
 
        /**