Limit text field of deletion, protection and user rights changes reasons to 255 chara...
authorRotem Liss <rotem@users.mediawiki.org>
Sun, 4 Nov 2007 15:20:45 +0000 (15:20 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Sun, 4 Nov 2007 15:20:45 +0000 (15:20 +0000)
RELEASE-NOTES
includes/Article.php
includes/ProtectionForm.php
includes/SpecialUserrights.php

index 5142a49..75c0537 100644 (file)
@@ -128,6 +128,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 11809) Use formatNum() for more numbers
 * (bug 11818) Fix native language name of Inuktitut (iu)
 * Remove all commas when parsing float numbers in sorted tables
+* Limit text field of deletion, protection and user rights changes reasons to
+  255 characters (already restricted in the database)
 
 === API changes in 1.12 ===
 
index 4041e16..e5c658d 100644 (file)
@@ -2027,7 +2027,7 @@ class Article {
                                <label for='wpReason'>{$delcom}:</label>
                        </td>
                        <td align='left'>
-                               <input type='text' size='60' name='wpReason' id='wpReason' value=\"" . htmlspecialchars( $reason ) . "\" tabindex=\"1\" />
+                               <input type='text' maxlength='255' size='60' name='wpReason' id='wpReason' value=\"" . htmlspecialchars( $reason ) . "\" tabindex=\"1\" />
                        </td>
                </tr>
                <tr>
index 475b2f9..e2c8db7 100644 (file)
@@ -321,6 +321,7 @@ class ProtectionForm {
                        '</td><td>' .
                        wfElement( 'input', array(
                                'size' => 60,
+                               'maxlength' => 255,
                                'name' => $id,
                                'id' => $id,
                                'value' => $this->mReason ) );
index ab2cd79..6af65c3 100644 (file)
@@ -214,7 +214,7 @@ class UserrightsForm extends HTMLForm {
                                        Xml::label( wfMsg( 'userrights-reason' ), 'wpReason' ) .
                                "</td>
                                <td>" .
-                                       Xml::input( 'user-reason', 60, false, array( 'id' => 'wpReason' ) ) .
+                                       Xml::input( 'user-reason', 60, false, array( 'id' => 'wpReason', 'maxlength' => 255 ) ) .
                                "</td>
                        </tr>
                        <tr>