WMDE-leszek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330214 )

Change subject: Specify the namespace when linking to Special:EntityPage
......................................................................

Specify the namespace when linking to Special:EntityPage

Title::makeTitle docs state that page title should be provided
unprefixed.

Change-Id: Ied506ed075dfb68ddaf7c18ca00765c78b5feeeb
---
M repo/includes/Content/EntityContentFactory.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/repo/includes/Content/EntityContentFactory.php 
b/repo/includes/Content/EntityContentFactory.php
index 65a655c..193623d 100644
--- a/repo/includes/Content/EntityContentFactory.php
+++ b/repo/includes/Content/EntityContentFactory.php
@@ -105,14 +105,14 @@
         */
        public function getTitleForId( EntityId $id ) {
                if ( $id->isForeign() ) {
-                       $pageName = 'Special:EntityPage/' . $id->getLocalPart();
+                       $pageName = 'EntityPage/' . $id->getLocalPart();
 
                        // TODO: The interwiki prefix *should* be the same as 
the repo name,
                        //        but we have no way to know or guarantee this! 
See T153496.
                        $interwiki = $id->getRepositoryName();
 
                        // TODO: use a TitleFactory
-                       return Title::makeTitle( 0, $pageName, '', $interwiki );
+                       return Title::makeTitle( NS_SPECIAL, $pageName, '', 
$interwiki );
                } else {
                        $handler = $this->getContentHandlerForType( 
$id->getEntityType() );
                        return $handler->getTitleForId( $id );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied506ed075dfb68ddaf7c18ca00765c78b5feeeb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek <leszek.mani...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to