The parent constructor sets the $context for the Page, but the getConfig
is before the call, which results in a warning for using
RequestContext::getMain(). Just set the context before use.
Change-Id: Icf3faefe8c20c017a479f07594809dfb003db9af
function __construct( IContextSource $context, $userName = null, $search = '',
$including = false, $showAll = false
) {
+ $this->setContext( $context );
$this->mIncluding = $including;
$this->mShowAll = $showAll;
}
if ( !$including ) {
- if ( $context->getRequest()->getText( 'sort', 'img_date' ) == 'img_date' ) {
+ if ( $this->getRequest()->getText( 'sort', 'img_date' ) == 'img_date' ) {
$this->mDefaultDirection = IndexPager::DIR_DESCENDING;
} else {
$this->mDefaultDirection = IndexPager::DIR_ASCENDING;