Jeroen De Dauw has uploaded a new change for review.

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

Change subject: Fix broken CreatedBlacklistedItems
......................................................................

Fix broken CreatedBlacklistedItems

Item was not referenced. Also removed usage of deprecated methods

Change-Id: Ie08a2436709e95acd04d0a0a8995cc53ea00e08d
---
M repo/maintenance/createBlacklistedItems.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/repo/maintenance/createBlacklistedItems.php 
b/repo/maintenance/createBlacklistedItems.php
index 3d57b6c..aea62d5 100644
--- a/repo/maintenance/createBlacklistedItems.php
+++ b/repo/maintenance/createBlacklistedItems.php
@@ -2,7 +2,7 @@
 
 namespace Wikibase;
 
-use Wikibase\DataModel\SiteLink;
+use Wikibase\DataModel\Entity\Item;
 use Wikibase\Repo\WikibaseRepo;
 
 $basePath = getenv( 'MW_INSTALL_PATH' ) !== false ? getenv( 'MW_INSTALL_PATH' 
) : __DIR__ . '/../../../..';
@@ -70,8 +70,8 @@
                        $item = Item::newEmpty();
 
                        $item->setId( $id );
-                       $item->setLabel( 'en', $name );
-                       $item->addSiteLink( new SiteLink( 'enwiki', $name ) );
+                       $item->getFingerprint()->setLabel( 'en', $name );
+                       $item->getSiteLinkList()->addNewSiteLink( 'enwiki', 
$name );
 
                        $store->saveEntity( $item, 'Import', $user, EDIT_NEW );
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/176316
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie08a2436709e95acd04d0a0a8995cc53ea00e08d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to