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

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(-)

Approvals:
  WikidataJenkins: Verified
  Thiemo Mättig (WMDE): Verified; Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I85c7953f372c2c64fac183abb12360d4a1cdaff1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang <adrian.l...@wikimedia.de>
Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: WikidataJenkins <wikidata-servi...@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