r95827 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95826‎ | r95827 | r95828 >
Date:00:46, 31 August 2011
Author:werdna
Status:ok
Tags:
Comment:
Remove empty comments when dumping
Modified paths:
  • /trunk/extensions/SecurePoll/includes/talliers/CommentDumper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SecurePoll/includes/talliers/CommentDumper.php
@@ -34,6 +34,12 @@
3535
3636 $comments = $scores['comment'];
3737 unset($scores['comment']);
 38+
 39+ // Short circuit if the comments are empty
 40+ if ( $comments['native'] == '' && $comments['en'] == '' ) {
 41+ return Status::newGood();
 42+ }
 43+
3844 $output = array( $comments['native'], $comments['en'] );
3945
4046 ksort( $output );

Status & tagging log