jenkins-bot has submitted this change and it was merged.
Change subject: Add details for no-external-page
......................................................................
Add details for no-external-page
Bug: 42023
Change-Id: If7e7bbfe119bfb82e935f4f03c5429c7650c62db
---
M repo/includes/api/EditEntity.php
1 file changed, 6 insertions(+), 3 deletions(-)
Approvals:
Tobias Gritschacher: Looks good to me, approved
jenkins-bot: Verified
diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php
index f10cb03..bda21e9 100644
--- a/repo/includes/api/EditEntity.php
+++ b/repo/includes/api/EditEntity.php
@@ -319,6 +319,7 @@
foreach ( $siteLinks as $siteId => $arg ) {
$status->merge( $this->checkSiteLinks( $arg, $siteId,
$sites ) );
$globalSiteId = $arg['site'];
+ $pageTitle = $arg['title'];
if ( $sites->hasSite( $globalSiteId ) ) {
$linkSite = $sites->getSite( $globalSiteId );
@@ -326,13 +327,15 @@
$this->dieUsage( "There is no site for global
site id '$globalSiteId'", 'no-such-site' );
}
- if ( array_key_exists( 'remove', $arg ) ||
$arg['title'] === "" ) {
+ if ( array_key_exists( 'remove', $arg ) || $pageTitle
=== "" ) {
$siteLinksChangeOps[] = new ChangeOpSiteLink(
$globalSiteId, null );
} else {
- $linkPage = $linkSite->normalizePageName(
$this->stringNormalizer->trimWhitespace( $arg['title'] ) );
+ $linkPage = $linkSite->normalizePageName(
$this->stringNormalizer->trimWhitespace( $pageTitle ) );
if ( $linkPage === false ) {
- $this->dieUsage( 'The external client
site did not provide page information' , 'no-external-page' );
+ $this->dieUsage(
+ "The external client site did
not provide page information for site '{$globalSiteId}' and title
'{$pageTitle}'",
+ 'no-external-page' );
}
$siteLinksChangeOps[] = new ChangeOpSiteLink(
$globalSiteId, $linkPage );
--
To view, visit https://gerrit.wikimedia.org/r/78949
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If7e7bbfe119bfb82e935f4f03c5429c7650c62db
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Daniel Werner <[email protected]>
Gerrit-Reviewer: Denny Vrandecic <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: Merl <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits