[MediaWiki-commits] [Gerrit] Rename ambiguous $repo to $wikibaseRepo - change (mediawiki...Wikibase)

2014-12-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rename ambiguous $repo to $wikibaseRepo
..


Rename ambiguous $repo to $wikibaseRepo

This is split from I04767f2.

Change-Id: Idc31b4b81fca351358f659f8f3f8fbaa2ebe61d5
---
M repo/includes/View/SiteLinksView.php
M repo/includes/api/EditEntity.php
M repo/includes/api/MergeItems.php
M repo/includes/api/ModifyEntity.php
M repo/includes/content/EntityContent.php
M repo/includes/specials/SpecialEntityData.php
M repo/includes/specials/SpecialMergeItems.php
M repo/includes/specials/SpecialSetSiteLink.php
8 files changed, 41 insertions(+), 45 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/View/SiteLinksView.php 
b/repo/includes/View/SiteLinksView.php
index cbc15d7..d158e46 100644
--- a/repo/includes/View/SiteLinksView.php
+++ b/repo/includes/View/SiteLinksView.php
@@ -63,9 +63,7 @@
$this->languageCode = $languageCode;
 
// @todo inject option/objects instead of using the singleton
-   $repo = WikibaseRepo::getDefaultInstance();
-
-   $settings = $repo->getSettings();
+   $settings = WikibaseRepo::getDefaultInstance()->getSettings();
$this->specialSiteLinkGroups = $settings->getSetting( 
'specialSiteLinkGroups' );
$this->badgeItems = $settings->getSetting( 'badgeItems' );
}
diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php
index 45b10ae..67e3904 100644
--- a/repo/includes/api/EditEntity.php
+++ b/repo/includes/api/EditEntity.php
@@ -84,8 +84,7 @@
 
$this->validLanguageCodes = array_flip( 
Utils::getLanguageCodes() );
 
-   $repo = WikibaseRepo::getDefaultInstance();
-   $changeOpFactoryProvider = $repo->getChangeOpFactoryProvider();
+   $changeOpFactoryProvider = 
WikibaseRepo::getDefaultInstance()->getChangeOpFactoryProvider();
$this->termChangeOpFactory = 
$changeOpFactoryProvider->getFingerprintChangeOpFactory();
$this->claimChangeOpFactory = 
$changeOpFactoryProvider->getClaimChangeOpFactory();
$this->siteLinkChangeOpFactory = 
$changeOpFactoryProvider->getSiteLinkChangeOpFactory();
diff --git a/repo/includes/api/MergeItems.php b/repo/includes/api/MergeItems.php
index 4c6484f..9d4dab6 100644
--- a/repo/includes/api/MergeItems.php
+++ b/repo/includes/api/MergeItems.php
@@ -53,18 +53,18 @@
public function __construct( ApiMain $mainModule, $moduleName, 
$modulePrefix = '' ) {
parent::__construct( $mainModule, $moduleName, $modulePrefix );
 
-   $repo = WikibaseRepo::getDefaultInstance();
+   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
 
$this->setServices(
-   $repo->getEntityIdParser(),
-   $repo->getApiHelperFactory()->getErrorReporter( $this ),
-   $repo->getApiHelperFactory()->getResultBuilder( $this ),
+   $wikibaseRepo->getEntityIdParser(),
+   $wikibaseRepo->getApiHelperFactory()->getErrorReporter( 
$this ),
+   $wikibaseRepo->getApiHelperFactory()->getResultBuilder( 
$this ),
new ItemMergeInteractor(
-   
$repo->getChangeOpFactoryProvider()->getMergeChangeOpFactory(),
-   $repo->getEntityRevisionLookup( 'uncached' ),
-   $repo->getEntityStore(),
-   $repo->getEntityPermissionChecker(),
-   $repo->getSummaryFormatter(),
+   
$wikibaseRepo->getChangeOpFactoryProvider()->getMergeChangeOpFactory(),
+   $wikibaseRepo->getEntityRevisionLookup( 
'uncached' ),
+   $wikibaseRepo->getEntityStore(),
+   $wikibaseRepo->getEntityPermissionChecker(),
+   $wikibaseRepo->getSummaryFormatter(),
$this->getUser()
)
);
diff --git a/repo/includes/api/ModifyEntity.php 
b/repo/includes/api/ModifyEntity.php
index 8696afe..6ad1065 100644
--- a/repo/includes/api/ModifyEntity.php
+++ b/repo/includes/api/ModifyEntity.php
@@ -81,19 +81,20 @@
public function __construct( ApiMain $mainModule, $moduleName, 
$modulePrefix = '' ) {
parent::__construct( $mainModule, $moduleName, $modulePrefix );
 
-   $repo = WikibaseRepo::getDefaultInstance();
+   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
+   $settings = $wikibaseRepo->getSettings();
 
//TODO: provide a mechanism to override the services
-   $this->stringNormalizer = $repo->getStringNormalizer(

[MediaWiki-commits] [Gerrit] Rename ambiguous $repo to $wikibaseRepo - change (mediawiki...Wikibase)

2014-12-03 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Rename ambiguous $repo to $wikibaseRepo
..

Rename ambiguous $repo to $wikibaseRepo

This is split from I04767f2.

Change-Id: Idc31b4b81fca351358f659f8f3f8fbaa2ebe61d5
---
M repo/includes/View/SiteLinksView.php
M repo/includes/api/EditEntity.php
M repo/includes/api/MergeItems.php
M repo/includes/api/ModifyEntity.php
M repo/includes/content/EntityContent.php
M repo/includes/specials/SpecialEntityData.php
M repo/includes/specials/SpecialMergeItems.php
M repo/includes/specials/SpecialSetSiteLink.php
8 files changed, 41 insertions(+), 45 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/00/177200/1

diff --git a/repo/includes/View/SiteLinksView.php 
b/repo/includes/View/SiteLinksView.php
index cbc15d7..d158e46 100644
--- a/repo/includes/View/SiteLinksView.php
+++ b/repo/includes/View/SiteLinksView.php
@@ -63,9 +63,7 @@
$this->languageCode = $languageCode;
 
// @todo inject option/objects instead of using the singleton
-   $repo = WikibaseRepo::getDefaultInstance();
-
-   $settings = $repo->getSettings();
+   $settings = WikibaseRepo::getDefaultInstance()->getSettings();
$this->specialSiteLinkGroups = $settings->getSetting( 
'specialSiteLinkGroups' );
$this->badgeItems = $settings->getSetting( 'badgeItems' );
}
diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php
index 2d246d0..5445a54 100644
--- a/repo/includes/api/EditEntity.php
+++ b/repo/includes/api/EditEntity.php
@@ -84,8 +84,7 @@
 
$this->validLanguageCodes = array_flip( 
Utils::getLanguageCodes() );
 
-   $repo = WikibaseRepo::getDefaultInstance();
-   $changeOpFactoryProvider = $repo->getChangeOpFactoryProvider();
+   $changeOpFactoryProvider = 
WikibaseRepo::getDefaultInstance()->getChangeOpFactoryProvider();
$this->termChangeOpFactory = 
$changeOpFactoryProvider->getFingerprintChangeOpFactory();
$this->claimChangeOpFactory = 
$changeOpFactoryProvider->getClaimChangeOpFactory();
$this->siteLinkChangeOpFactory = 
$changeOpFactoryProvider->getSiteLinkChangeOpFactory();
diff --git a/repo/includes/api/MergeItems.php b/repo/includes/api/MergeItems.php
index 4c6484f..9d4dab6 100644
--- a/repo/includes/api/MergeItems.php
+++ b/repo/includes/api/MergeItems.php
@@ -53,18 +53,18 @@
public function __construct( ApiMain $mainModule, $moduleName, 
$modulePrefix = '' ) {
parent::__construct( $mainModule, $moduleName, $modulePrefix );
 
-   $repo = WikibaseRepo::getDefaultInstance();
+   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
 
$this->setServices(
-   $repo->getEntityIdParser(),
-   $repo->getApiHelperFactory()->getErrorReporter( $this ),
-   $repo->getApiHelperFactory()->getResultBuilder( $this ),
+   $wikibaseRepo->getEntityIdParser(),
+   $wikibaseRepo->getApiHelperFactory()->getErrorReporter( 
$this ),
+   $wikibaseRepo->getApiHelperFactory()->getResultBuilder( 
$this ),
new ItemMergeInteractor(
-   
$repo->getChangeOpFactoryProvider()->getMergeChangeOpFactory(),
-   $repo->getEntityRevisionLookup( 'uncached' ),
-   $repo->getEntityStore(),
-   $repo->getEntityPermissionChecker(),
-   $repo->getSummaryFormatter(),
+   
$wikibaseRepo->getChangeOpFactoryProvider()->getMergeChangeOpFactory(),
+   $wikibaseRepo->getEntityRevisionLookup( 
'uncached' ),
+   $wikibaseRepo->getEntityStore(),
+   $wikibaseRepo->getEntityPermissionChecker(),
+   $wikibaseRepo->getSummaryFormatter(),
$this->getUser()
)
);
diff --git a/repo/includes/api/ModifyEntity.php 
b/repo/includes/api/ModifyEntity.php
index 8696afe..6ad1065 100644
--- a/repo/includes/api/ModifyEntity.php
+++ b/repo/includes/api/ModifyEntity.php
@@ -81,19 +81,20 @@
public function __construct( ApiMain $mainModule, $moduleName, 
$modulePrefix = '' ) {
parent::__construct( $mainModule, $moduleName, $modulePrefix );
 
-   $repo = WikibaseRepo::getDefaultInstance();
+   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
+   $settings = $wikibaseRepo->getSettings();
 
//TODO: provide a mechanism to override the services
-