Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Fix messages in SpecialSetSiteLink
......................................................................

Fix messages in SpecialSetSiteLink

This is a direct follow-up for the mistake introduced in
Ibe52435c2d1c2cd4040c4325694d382e50609d80
and mentioned in
If9e38fb54bd6746d1ceacd74e0922a776cf72bf0.

Change-Id: I3c1363e5e9f982f53e12eed27035d3296bf8f09f
---
M repo/includes/specials/SpecialSetSiteLink.php
1 file changed, 4 insertions(+), 6 deletions(-)


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

diff --git a/repo/includes/specials/SpecialSetSiteLink.php 
b/repo/includes/specials/SpecialSetSiteLink.php
index 5564543..150ba32 100644
--- a/repo/includes/specials/SpecialSetSiteLink.php
+++ b/repo/includes/specials/SpecialSetSiteLink.php
@@ -5,15 +5,13 @@
 use Html;
 use OutOfBoundsException;
 use Status;
-use Wikibase\ChangeOp\ChangeOp;
 use Wikibase\ChangeOp\ChangeOpException;
 use Wikibase\ChangeOp\SiteLinkChangeOpFactory;
-use Wikibase\ChangeOp\ChangeOpValidationException;
 use Wikibase\CopyrightMessageBuilder;
 use Wikibase\DataModel\Entity\Entity;
+use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\Summary;
 
@@ -385,8 +383,8 @@
                foreach ( $badges as $badge ) {
                        try {
                                $badgeId = $entityIdParser->parse( $badge );
-                       } catch( EntityIdParsingException $e ) {
-                               $status->fatal( 'wikibase-setentity-invalid-id' 
);
+                       } catch ( EntityIdParsingException $ex ) {
+                               $status->fatal( 
'wikibase-setsitelink-not-badge', $badge );
                                return false;
                        }
 
@@ -406,7 +404,7 @@
                        $itemTitle = $this->getEntityTitle( $badgeId );
 
                        if ( is_null( $itemTitle ) || !$itemTitle->exists() ) {
-                               $status->fatal( 'wikibase-setentity-invalid-id' 
);
+                               $status->fatal( 
'wikibase-setsitelink-not-badge', $badgeId );
                                return false;
                        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c1363e5e9f982f53e12eed27035d3296bf8f09f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>

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

Reply via email to