Add maxlength of 6 for time correction in preferences
authorMatthew Flaschen <mflaschen@wikimedia.org>
Fri, 19 Sep 2014 04:33:01 +0000 (00:33 -0400)
committerJdlrobson <jrobson@wikimedia.org>
Mon, 22 Sep 2014 17:37:49 +0000 (17:37 +0000)
* Supported formats (controlled by filterTimezoneInput) are:
** -12:34/01:23.  It says, "Max is +14:00 and min is -12:00", both
   of which fit in 6 (if someone uses -24:00/+24:00, it's the same width
   anyway).
** If it's not in that format, it's treated as a simple hour, which
   means it should be from -12 to +14 (max 3).

Bug: 70405
Change-Id: I47ec2c07929069cb5243c306a1c502751e57a31b

includes/Preferences.php

index 84cf5af..98fc936 100644 (file)
@@ -706,6 +706,7 @@ class Preferences {
                        'options' => $tzOptions,
                        'default' => $tzSetting,
                        'size' => 20,
+                       'maxlength' => 6,
                        'section' => 'rendering/timeoffset',
                );
        }