dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bb87a5
)
API: Handle empty xxnamespace parameter in ApiQueryBacklinksprop
author
Brad Jorsch
<bjorsch@wikimedia.org>
Mon, 1 Oct 2018 14:18:40 +0000
(10:18 -0400)
committer
Brad Jorsch
<bjorsch@wikimedia.org>
Mon, 1 Oct 2018 14:18:40 +0000
(10:18 -0400)
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
includes/api/ApiQueryBacklinksprop.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiQueryBacklinksprop.php
b/includes/api/ApiQueryBacklinksprop.php
index
bfacc51
..
f04ac66
100644
(file)
--- 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