Aude has uploaded a new change for review.
https://gerrit.wikimedia.org/r/81117
Change subject: (bug 53367) check that both sites and titles are set before
doing get entities lookup
......................................................................
(bug 53367) check that both sites and titles are set before doing get entities
lookup
Change-Id: I80a9dec874b7e8e662c82638eac35ed350fb4563
---
M repo/includes/api/GetEntities.php
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/17/81117/1
diff --git a/repo/includes/api/GetEntities.php
b/repo/includes/api/GetEntities.php
index 0f2caec..6f561b1 100644
--- a/repo/includes/api/GetEntities.php
+++ b/repo/includes/api/GetEntities.php
@@ -67,7 +67,8 @@
$params['ids'] = array();
}
- if ( !empty( $params['sites'] ) ) {
+ // todo output a warning if the user gives one but not the
other param
+ if ( !empty( $params['sites'] ) && !empty( $params['titles'] )
) {
$siteLinkCache =
StoreFactory::getStore()->newSiteLinkCache();
$siteStore = \SiteSQLStore::newInstance();
$itemByTitleHelper = new ItemByTitleHelper( $this,
$siteLinkCache, $siteStore, $this->stringNormalizer );
--
To view, visit https://gerrit.wikimedia.org/r/81117
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I80a9dec874b7e8e662c82638eac35ed350fb4563
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits