Aude has uploaded a new change for review.

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


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: I51983c7fd11049b1399919f65d98a62693ecb59a
---
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/22/81122/1

diff --git a/repo/includes/api/GetEntities.php 
b/repo/includes/api/GetEntities.php
index f0f3bd8..6e8862b 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/81122
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51983c7fd11049b1399919f65d98a62693ecb59a
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

Reply via email to