Daniel Kinzler has submitted this change and it was merged.
Change subject: Rename getSiteLinkTable to getSiteLinkLookup
......................................................................
Rename getSiteLinkTable to getSiteLinkLookup
Looks like the interface was introduced later and that's why the
getter is called after the sub class instead of the interface.
Change-Id: Ib41e33e8306ac4cdf7d82342a5b72784c08405b3
---
M client/WikibaseClient.hooks.php
M client/includes/WikibaseClient.php
M client/includes/hooks/UpdateRepoHookHandlers.php
M client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
M client/includes/store/ClientStore.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/MockClientStore.php
M client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php
8 files changed, 17 insertions(+), 17 deletions(-)
Approvals:
Daniel Kinzler: Looks good to me, approved
jenkins-bot: Verified
diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index ad9078e..a10073f 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -174,7 +174,7 @@
public static function onSpecialMovepageAfterMove( MovePageForm
$movePage, Title &$oldTitle,
Title &$newTitle ) {
$wikibaseClient = WikibaseClient::getDefaultInstance();
- $siteLinkLookup =
$wikibaseClient->getStore()->getSiteLinkTable();
+ $siteLinkLookup =
$wikibaseClient->getStore()->getSiteLinkLookup();
$repoLinker = $wikibaseClient->newRepoLinker();
$movePageNotice = new MovePageNoticeCreator(
@@ -377,7 +377,7 @@
}
$wikibaseClient = WikibaseClient::getDefaultInstance();
- $siteLinkLookup =
$wikibaseClient->getStore()->getSiteLinkTable();
+ $siteLinkLookup =
$wikibaseClient->getStore()->getSiteLinkLookup();
return $siteLinkLookup->getEntityIdForSiteLink(
new SiteLink(
$wikibaseClient->getSite()->getGlobalId(),
@@ -672,7 +672,7 @@
$infoActionHookHandler = new InfoActionHookHandler(
$namespaceChecker,
$wikibaseClient->newRepoLinker(),
- $wikibaseClient->getStore()->getSiteLinkTable(),
+ $wikibaseClient->getStore()->getSiteLinkLookup(),
$settings->getSetting( 'siteGlobalID' )
);
@@ -692,7 +692,7 @@
*/
public static function onArticleDeleteAfterSuccess( Title $title,
OutputPage $out ) {
$wikibaseClient = WikibaseClient::getDefaultInstance();
- $siteLinkLookup =
$wikibaseClient->getStore()->getSiteLinkTable();
+ $siteLinkLookup =
$wikibaseClient->getStore()->getSiteLinkLookup();
$repoLinker = $wikibaseClient->newRepoLinker();
$deletePageNotice = new DeletePageNoticeCreator(
diff --git a/client/includes/WikibaseClient.php
b/client/includes/WikibaseClient.php
index d3cb261..f3163ca 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -539,7 +539,7 @@
$this->getLanguageLinkBadgeDisplay(),
$this->settings->getSetting( 'siteGlobalID' ),
$this->getNamespaceChecker(),
- $this->getStore()->getSiteLinkTable(),
+ $this->getStore()->getSiteLinkLookup(),
$this->getStore()->getEntityLookup(),
$this->getSiteStore()->getSites(),
$this->getLangLinkSiteGroup()
@@ -649,7 +649,7 @@
public function getOtherProjectsSidebarGeneratorFactory() {
return new OtherProjectsSidebarGeneratorFactory(
$this->settings,
- $this->getStore()->getSiteLinkTable(),
+ $this->getStore()->getSiteLinkLookup(),
$this->getSiteStore()
);
}
@@ -708,7 +708,7 @@
public function getPropertyParserFunctionRunner() {
return new Runner(
$this->getPropertyClaimsRendererFactory(),
- $this->getStore()->getSiteLinkTable(),
+ $this->getStore()->getSiteLinkLookup(),
$this->settings->getSetting( 'siteGlobalID' )
);
}
diff --git a/client/includes/hooks/UpdateRepoHookHandlers.php
b/client/includes/hooks/UpdateRepoHookHandlers.php
index 45566a2..e609901 100644
--- a/client/includes/hooks/UpdateRepoHookHandlers.php
+++ b/client/includes/hooks/UpdateRepoHookHandlers.php
@@ -75,7 +75,7 @@
return true;
}
- $siteLinkLookup =
$wikibaseClient->getStore()->getSiteLinkTable();
+ $siteLinkLookup =
$wikibaseClient->getStore()->getSiteLinkLookup();
return new UpdateRepoHookHandlers(
$namespaceChecker,
diff --git a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
index 5a9fac5..bd4de1e 100644
--- a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
+++ b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -48,7 +48,7 @@
return new WikibaseLuaBindings(
$wikibaseClient->getEntityIdParser(),
$entityLookup,
- $wikibaseClient->getStore()->getSiteLinkTable(),
+ $wikibaseClient->getStore()->getSiteLinkLookup(),
$wikibaseClient->getLanguageFallbackChainFactory(),
$language,
$wikibaseClient->getSettings(),
diff --git a/client/includes/store/ClientStore.php
b/client/includes/store/ClientStore.php
index 4aa1cc2..b6f026e 100644
--- a/client/includes/store/ClientStore.php
+++ b/client/includes/store/ClientStore.php
@@ -26,7 +26,7 @@
*
* @return SiteLinkLookup
*/
- public function getSiteLinkTable();
+ public function getSiteLinkLookup();
/**
* @since 0.5
diff --git a/client/includes/store/sql/DirectSqlStore.php
b/client/includes/store/sql/DirectSqlStore.php
index 88ea5fa..3dad610 100644
--- a/client/includes/store/sql/DirectSqlStore.php
+++ b/client/includes/store/sql/DirectSqlStore.php
@@ -185,7 +185,7 @@
if ( $this->useLegacyUsageIndex ) {
$this->usageLookup = new SiteLinkUsageLookup(
$this->getSite()->getGlobalId(),
- $this->getSiteLinkTable(),
+ $this->getSiteLinkLookup(),
new TitleFactory()
);
} else {
@@ -245,13 +245,11 @@
}
/**
- * @see Store::getSiteLinkTable
- *
- * @since 0.4
+ * @see ClientStore::getSiteLinkLookup
*
* @return SiteLinkLookup
*/
- public function getSiteLinkTable() {
+ public function getSiteLinkLookup() {
if ( !$this->siteLinkTable ) {
$this->siteLinkTable = $this->newSiteLinkTable();
}
diff --git a/client/tests/phpunit/MockClientStore.php
b/client/tests/phpunit/MockClientStore.php
index 79ba782..9b6d402 100644
--- a/client/tests/phpunit/MockClientStore.php
+++ b/client/tests/phpunit/MockClientStore.php
@@ -60,9 +60,11 @@
}
/**
+ * @see ClientStore::getSiteLinkLookup
+ *
* @return SiteLinkLookup
*/
- public function getSiteLinkTable() {
+ public function getSiteLinkLookup() {
return $this->getMock();
}
diff --git a/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php
b/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php
index b52cf11..1115eb0 100644
--- a/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php
+++ b/client/tests/phpunit/includes/store/sql/DirectSqlStoreTest.php
@@ -51,7 +51,7 @@
public static function provideGetters() {
return array(
- array( 'getSiteLinkTable',
'Wikibase\Lib\Store\SiteLinkTable' ),
+ array( 'getSiteLinkLookup',
'Wikibase\Lib\Store\SiteLinkTable' ),
array( 'getEntityLookup',
'Wikibase\Lib\Store\EntityLookup' ),
array( 'getTermIndex', 'Wikibase\TermIndex' ),
array( 'getPropertyLabelResolver',
'Wikibase\PropertyLabelResolver' ),
--
To view, visit https://gerrit.wikimedia.org/r/177194
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib41e33e8306ac4cdf7d82342a5b72784c08405b3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits