Addshore has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/120236

Change subject: Fix ApiSandbox continue param default
......................................................................

Fix ApiSandbox continue param default

This is how the continue param is defined for things
in core. This stops the ApiSandbox extension from
giving continue a default of 10.

This patch adds to the previous patch that has this
name

Bug: 62959
Change-Id: I7e4ba3bef60df70a2a47360c90f373da203d47fc
---
M repo/includes/api/SearchEntities.php
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/36/120236/1

diff --git a/repo/includes/api/SearchEntities.php 
b/repo/includes/api/SearchEntities.php
index ae5c8fd..99d8319 100644
--- a/repo/includes/api/SearchEntities.php
+++ b/repo/includes/api/SearchEntities.php
@@ -266,13 +266,11 @@
                // Actual result set.
                $entries = array_slice( $entries, $params['continue'], 
$params['limit'] );
 
-               $allowedParams = $this->getAllowedParams();
                $nextContinuation = $params['continue'] + $params['limit'];
-               $maxContinuation = 
$allowedParams['continue'][ApiBase::PARAM_MAX];
 
                // Only pass search-continue param if there are more results 
and the maximum continuation
                // limit is not exceeded.
-               if ( $hits > $nextContinuation && $nextContinuation <= 
$maxContinuation ) {
+               if ( $hits > $nextContinuation && $nextContinuation <= 
ApiBase::LIMIT_SML1  ) {
                        $this->getResult()->addValue(
                                null,
                                'search-continue',

-- 
To view, visit https://gerrit.wikimedia.org/r/120236
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e4ba3bef60df70a2a47360c90f373da203d47fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <addshorew...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to