r79844 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79843‎ | r79844 | r79845 >
Date:21:55, 7 January 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Don't trim comments, rtrim them.

Followup r72626

Fixes reopened bug 25101 and also closes bug 26619


Also rtrimming preview comments too
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -524,7 +524,7 @@
525525 * @return CodeComment
526526 */
527527 public function previewComment( $text, $review, $parent = null ) {
528 - $data = $this->commentData( $text, $review, $parent );
 528+ $data = $this->commentData( rtrim( $text ), $review, $parent );
529529 $data['cc_id'] = null;
530530 return CodeComment::newFromData( $this, $data );
531531 }
@@ -536,7 +536,7 @@
537537 * @return int
538538 */
539539 public function saveComment( $text, $review, $parent = null ) {
540 - $text = trim( $text );
 540+ $text = rtrim( $text );
541541 if ( !strlen( $text ) ) {
542542 return 0;
543543 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r839321.17wmf1: MFT r78990, r79844, r81548, r82022, r82193, r83061, r83067, r83583,...catrope17:59, 14 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72626Bug 25101 - Trim comments before savingreedy04:10, 9 September 2010

Comments

#Comment by Hashar (talk | contribs)   20:40, 10 March 2011

marking for merging in 1.17

Status & tagging log