Aude has uploaded a new change for review.

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


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: Ifd731aab87485ee6b4c2d1c4af56edaaf06f3376
---
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/20/81120/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/81120
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd731aab87485ee6b4c2d1c4af56edaaf06f3376
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.22-wmf14
Gerrit-Owner: Aude <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to