Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/119452
Change subject: Don't render empty listviews for qualifiers ...................................................................... Don't render empty listviews for qualifiers This is related to bug 62527. Change-Id: I85c7953f372c2c64fac183abb12360d4a1cdaff1 --- M repo/includes/ClaimHtmlGenerator.php 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/52/119452/1 diff --git a/repo/includes/ClaimHtmlGenerator.php b/repo/includes/ClaimHtmlGenerator.php index 33e399d..d3f8f80 100644 --- a/repo/includes/ClaimHtmlGenerator.php +++ b/repo/includes/ClaimHtmlGenerator.php @@ -157,9 +157,7 @@ ); } - return wfTemplate( 'wb-listview', - $snaklistviewsHtml - ); + return $this->wrapInListview( $snaklistviewsHtml ); } /** @@ -175,13 +173,15 @@ $referencesHtml .= $this->getHtmlForReference( $reference ); } - if( $referencesHtml !== '' ) { - $referencesHtml = wfTemplate( 'wb-listview', - $referencesHtml - ); - } + return $this->wrapInListview( $referencesHtml ); + } - return $referencesHtml; + private function wrapInListview( $listviewContent ) { + if( $listviewContent !== '' ) { + return wfTemplate( 'wb-listview', $listviewContent ); + } else { + return ''; + } } /** -- To view, visit https://gerrit.wikimedia.org/r/119452 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85c7953f372c2c64fac183abb12360d4a1cdaff1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang <adrian.l...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits