From ea46bf1ff1f1a9b9c112a87b0be6ffb802a0690e Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Sun, 4 Nov 2007 15:20:45 +0000 Subject: [PATCH] Limit text field of deletion, protection and user rights changes reasons to 255 characters (already restricted in the database) --- RELEASE-NOTES | 2 ++ includes/Article.php | 2 +- includes/ProtectionForm.php | 1 + includes/SpecialUserrights.php | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5142a491d3..75c0537b05 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/Article.php b/includes/Article.php index 4041e16ca4..e5c658dcaf 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2027,7 +2027,7 @@ class Article { - + diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 475b2f9a33..e2c8db7e3e 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -321,6 +321,7 @@ class ProtectionForm { '' . wfElement( 'input', array( 'size' => 60, + 'maxlength' => 255, 'name' => $id, 'id' => $id, 'value' => $this->mReason ) ); diff --git a/includes/SpecialUserrights.php b/includes/SpecialUserrights.php index ab2cd796c6..6af65c33b2 100644 --- a/includes/SpecialUserrights.php +++ b/includes/SpecialUserrights.php @@ -214,7 +214,7 @@ class UserrightsForm extends HTMLForm { Xml::label( wfMsg( 'userrights-reason' ), 'wpReason' ) . " " . - Xml::input( 'user-reason', 60, false, array( 'id' => 'wpReason' ) ) . + Xml::input( 'user-reason', 60, false, array( 'id' => 'wpReason', 'maxlength' => 255 ) ) . " -- 2.20.1