Kaldari has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/57698


Change subject: Fixing case of empty edit summaries
......................................................................

Fixing case of empty edit summaries

In the case of empty edit summaries, don't construct an empty div

Change-Id: Ibd2adb19fb7222d21807bfb24b576da7098e8165
---
M formatters/NotificationFormatter.php
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/98/57698/1

diff --git a/formatters/NotificationFormatter.php 
b/formatters/NotificationFormatter.php
index eb2b06f..4815053 100644
--- a/formatters/NotificationFormatter.php
+++ b/formatters/NotificationFormatter.php
@@ -156,9 +156,11 @@
                                                $summary = $matches[1] . "<span 
class='autocomment'>" . $section . "</span>" . $matches[3];
                                        }
                                }
-                               $summary = wfMessage( 'echo-quotation-marks', 
$summary )->inContentLanguage()->plain();
-                               $summary = Xml::tags( 'span', array( 'class' => 
'comment' ), $summary );
-                               $summary = Xml::tags( 'div', array( 'class' => 
'mw-echo-summary' ), $summary );
+                               if ( $summary ) {
+                                       $summary = wfMessage( 
'echo-quotation-marks', $summary )->inContentLanguage()->plain();
+                                       $summary = Xml::tags( 'span', array( 
'class' => 'comment' ), $summary );
+                                       $summary = Xml::tags( 'div', array( 
'class' => 'mw-echo-summary' ), $summary );
+                               }
                        }
 
                        return $summary;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd2adb19fb7222d21807bfb24b576da7098e8165
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Kaldari <[email protected]>

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

Reply via email to