Revert "Limit searches at 500 per page"
authorChad <chadh@wikimedia.org>
Tue, 11 Feb 2014 01:03:45 +0000 (01:03 +0000)
committerChad <chadh@wikimedia.org>
Tue, 11 Feb 2014 01:03:45 +0000 (01:03 +0000)
People seem to like large slow search pages.

This reverts commit 42d4f35696852b2d72089dce86034792fdf4de8e.

Change-Id: I52ee602a81c1b6ec4e124008806271b0c74c581c

includes/WebRequest.php
includes/specials/SpecialSearch.php

index b3dda75..2a7c032 100644 (file)
@@ -795,12 +795,11 @@ class WebRequest {
         * 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 );
@@ -813,8 +812,8 @@ class WebRequest {
                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 );
index 98ae6f5..e4ca057 100644 (file)
@@ -120,7 +120,7 @@ class SpecialSearch extends SpecialPage {
         */
        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();