jenkins-bot has submitted this change and it was merged.

Change subject: Only look for linked item in case the Article exists
......................................................................


Only look for linked item in case the Article exists

That information is already known at that point, so that
operation is very cheap.

Change-Id: I031a7f7721602da7fa8be2b95ab51f4484aa0928
---
M client/WikibaseClient.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Aude: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 20d1195..1cdeb15 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -227,7 +227,7 @@
                if ( $idString !== null ) {
                        $entityIdParser = $wikibaseClient->getEntityIdParser();
                        $entityId = $entityIdParser->parse( $idString );
-               } elseif ( Action::getActionName( $skin ) !== 'view' ) {
+               } elseif ( Action::getActionName( $skin ) !== 'view' && 
$skin->getTitle()->exists() ) {
                        // Try to load the item ID from Database, but only do 
so on non-article views,
                        // (where the article's OutputPage isn't available to 
us).
                        $entityId = self::getEntityIdForTitle( 
$skin->getTitle() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I031a7f7721602da7fa8be2b95ab51f4484aa0928
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to