Skip to content

Commit

Permalink
Merge pull request #111 from DannyS712/patch-1
Browse files Browse the repository at this point in the history
Don't call WebRequest::getLimitOffset in 1.35
  • Loading branch information
jamesmontalvo3 authored Jun 12, 2020
2 parents 6fdbd59 + 787611f commit 7cf5c17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion specials/SpecialWatchAnalytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ public function execute( $parser = null ) {
$this->setHeaders();
$wgOut->addModuleStyles( 'ext.watchanalytics.specials' );

list( $this->limit, $this->offset ) = $wgRequest->getLimitOffset();
if ( method_exists( $wgRequest, 'getLimitOffsetForUser' ) ) {
// MW 1.35+
list( $this->limit, $this->offset ) = $wgRequest->getLimitOffsetForUser( $this->getUser() );
} else {
list( $this->limit, $this->offset ) = $wgRequest->getLimitOffset();
}

// $userTarget = isset( $parser ) ? $parser : $wgRequest->getVal( 'username' );
$this->mMode = $wgRequest->getVal( 'show' );
Expand Down

0 comments on commit 7cf5c17

Please sign in to comment.