From: Brad Jorsch Date: Mon, 1 Oct 2018 14:18:40 +0000 (-0400) Subject: API: Handle empty xxnamespace parameter in ApiQueryBacklinksprop X-Git-Tag: 1.34.0-rc.0~3916^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/Boston?a=commitdiff_plain;h=4000245c456229e513dcf104600093c74eed7c68;p=lhc%2Fweb%2Fwiklou.git API: Handle empty xxnamespace parameter in ApiQueryBacklinksprop If the xxnamespace parameter is specified but empty, we don't need to do anything because there will be no results. Bug: T205810 Change-Id: Iae5d766a5408368cadd01583d18b745661304a7f --- diff --git a/includes/api/ApiQueryBacklinksprop.php b/includes/api/ApiQueryBacklinksprop.php index bfacc51b92..f04ac663ce 100644 --- a/includes/api/ApiQueryBacklinksprop.php +++ b/includes/api/ApiQueryBacklinksprop.php @@ -129,6 +129,9 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase { if ( !$titles ) { return; // nothing to do } + if ( $params['namespace'] !== null && count( $params['namespace'] ) === 0 ) { + return; // nothing to do + } // Figure out what we're sorting by, and add associated WHERE clauses. // MySQL's query planner screws up if we include a field in ORDER BY