Fix allowUnlimitedResults + fix tests on 1.38.0+ (#70)

This commit is contained in:
Universal Omega 2021-12-15 16:23:13 -07:00 committed by GitHub
parent def70e249e
commit cf3e0566ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -218,7 +218,7 @@ class Query {
if ( $this->limit !== false ) {
$options['LIMIT'] = $this->limit;
} elseif ( $this->offset !== false ) {
} elseif ( $this->offset !== false && !Config::getSetting( 'allowUnlimitedResults' ) ) {
$options['LIMIT'] = $this->parameters->getParameter( 'count' );
}

View file

@ -8,14 +8,14 @@ use ImportStreamSource;
use MediaWiki\Auth\AuthManager;
use MediaWiki\MediaWikiServices;
use MediaWiki\User\UserFactory;
use MediaWikiTestCase;
use MediaWikiIntegrationTestCase;
use ParserOptions;
use RequestContext;
use Title;
use User;
use WikiImporter;
abstract class DPLIntegrationTestCase extends MediaWikiTestCase {
abstract class DPLIntegrationTestCase extends MediaWikiIntegrationTestCase {
/**
* Guard condition to ensure we only import seed data once per test suite run.
* @var bool