Put a high max limit of 60,000 on Special:LinkSearch
authorBrian Wolff <bawolff+wn@gmail.com>
Fri, 15 Apr 2016 21:42:21 +0000 (17:42 -0400)
committerBrian Wolff <bawolff+wn@gmail.com>
Fri, 15 Apr 2016 21:42:21 +0000 (17:42 -0400)
LinkSearch uses inefficient paging. Previously there was no
max limit, then it was 10,000, but people on enwiki are complaining,
so put it up to something high, like 60,000, to fix the immediate
issue.

Special page should of course be changed to use efficient paging.

Bug: T130058
Change-Id: I0c4b1ad0138571bcf286ca88bceebf86b9a095f6

includes/specials/SpecialLinkSearch.php

index 2a7046e..1ecbee0 100644 (file)
@@ -299,4 +299,14 @@ class LinkSearchPage extends QueryPage {
        protected function getGroupName() {
                return 'redirects';
        }
+
+       /**
+        * enwiki complained about low limits on this special page
+        *
+        * @see T130058
+        * @todo FIXME This special page should not use LIMIT for paging
+        */
+       protected function getMaxResults() {
+               return max( parent::getMaxResults(), 60000 );
+       }
 }