r92788 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92787‎ | r92788 | r92789 >
Date:20:37, 21 July 2011
Author:werdna
Status:ok
Tags:
Comment:
Add a hard length limit to the comment field in FeedbackItem.php
Modified paths:
  • /trunk/extensions/MoodBar/FeedbackItem.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/FeedbackItem.php
@@ -179,6 +179,8 @@
180180 return $value instanceof Title;
181181 } elseif ( $key == 'type' ) {
182182 return in_array( $value, self::$validTypes );
 183+ } elseif ( $key == 'comment' ) {
 184+ return mb_strlen( $value ) <= 140;
183185 }
184186
185187 return true;

Status & tagging log