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

Change subject: Make subpage ToC still show a name for projects without a 
displayname
......................................................................


Make subpage ToC still show a name for projects without a displayname

Bug: T149033
Change-Id: I3f2c9307b2b2050dad249a97a569b0b2a6845eb7
---
M includes/content/CollaborationHubTOC.php
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Harej: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/content/CollaborationHubTOC.php 
b/includes/content/CollaborationHubTOC.php
index 2b12aa4..5ebdaf4 100644
--- a/includes/content/CollaborationHubTOC.php
+++ b/includes/content/CollaborationHubTOC.php
@@ -103,7 +103,10 @@
                );
 
                // hubpage
-               $link = $this->renderItem( $title, $content->getDisplayName(), 
$image, 16 );
+
+               $name = $content->getDisplayName() == '' ? $title->getText() : 
$content->getDisplayName();
+               $link = $this->renderItem( $title, $name, $image, 16 );
+
                $html .= Html::rawElement(
                        'div',
                        [ 'class' => 'mw-ck-toc-subpage-hub' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f2c9307b2b2050dad249a97a569b0b2a6845eb7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra <[email protected]>
Gerrit-Reviewer: Harej <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to