* defaults if not given. The limit must be positive and is capped at 5000.
* Offset must be positive but is not capped.
*
- * @param int $deflimit limit to use if no input and the user hasn't set the option.
+ * @param $deflimit Integer: limit to use if no input and the user hasn't set the option.
* @param string $optionname to specify an option other than rclimit to pull from.
- * @param int $hardlimit the maximum upper limit to allow, usually 5000
* @return array first element is limit, second is offset
*/
- public function getLimitOffset( $deflimit = 50, $optionname = 'rclimit', $hardlimit = 5000 ) {
+ public function getLimitOffset( $deflimit = 50, $optionname = 'rclimit' ) {
global $wgUser;
$limit = $this->getInt( 'limit', 0 );
if ( $limit <= 0 ) {
$limit = $deflimit;
}
- if ( $limit > $hardlimit ) {
- $limit = $hardlimit; # We have *some* limits...
+ if ( $limit > 5000 ) {
+ $limit = 5000; # We have *some* limits...
}
$offset = $this->getInt( 'offset', 0 );
*/
public function load() {
$request = $this->getRequest();
- list( $this->limit, $this->offset ) = $request->getLimitOffset( 20, '', 500 );
+ list( $this->limit, $this->offset ) = $request->getLimitOffset( 20 );
$this->mPrefix = $request->getVal( 'prefix', '' );
$user = $this->getUser();