bug #1667887 HTML maxlength
This commit is contained in:
@@ -11,6 +11,7 @@ $HeadURL$
|
|||||||
- bug #1627210, #1083301, #1482401 [data] warning on duplicate indexes
|
- bug #1627210, #1083301, #1482401 [data] warning on duplicate indexes
|
||||||
- bug #1679055 #1050 - Table '<table name>' already exists
|
- bug #1679055 #1050 - Table '<table name>' already exists
|
||||||
- bug #1668724 JavaScript focus login Opera
|
- bug #1668724 JavaScript focus login Opera
|
||||||
|
- bug #1667887 HTML maxlength
|
||||||
- [gui] avoid displaying a wide selector in server selection
|
- [gui] avoid displaying a wide selector in server selection
|
||||||
+ [core] added PMA_fatalError() and made use of it
|
+ [core] added PMA_fatalError() and made use of it
|
||||||
. [i18n] use generic $strOptions
|
. [i18n] use generic $strOptions
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/* vim: expandtab sw=4 ts=4 sts=4: */
|
||||||
/**
|
/**
|
||||||
* vim: expandtab sw=4 ts=4 sts=4:
|
*
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -836,19 +837,14 @@ foreach ($loop_array as $vrowcount => $vrow) {
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ($len < 4) {
|
// field size should be at least 4 and max 40
|
||||||
$fieldsize = $maxlength = 4;
|
$fieldsize = min(max($len, 4), 40);
|
||||||
} else {
|
|
||||||
$fieldsize = (($len > 40) ? 40 : $len);
|
|
||||||
$maxlength = $len;
|
|
||||||
}
|
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<td>
|
<td>
|
||||||
<?php echo $backup_field . "\n"; ?>
|
<?php echo $backup_field . "\n"; ?>
|
||||||
<input type="text" name="fields<?php echo $field_name_appendix; ?>"
|
<input type="text" name="fields<?php echo $field_name_appendix; ?>"
|
||||||
value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>"
|
value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>"
|
||||||
maxlength="<?php echo $maxlength; ?>"
|
|
||||||
class="textfield" <?php echo $unnillify_trigger; ?>
|
class="textfield" <?php echo $unnillify_trigger; ?>
|
||||||
tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"
|
tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"
|
||||||
id="field_<?php echo ($idindex); ?>_3" />
|
id="field_<?php echo ($idindex); ?>_3" />
|
||||||
@@ -905,19 +901,8 @@ foreach ($loop_array as $vrowcount => $vrow) {
|
|||||||
|
|
||||||
} // end elseif ( binary or blob)
|
} // end elseif ( binary or blob)
|
||||||
else {
|
else {
|
||||||
// For char or varchar, respect the maximum length (M); for other
|
// field size should be at least 4 and max 40
|
||||||
// types (int or float), the length is not a limit on the values that
|
$fieldsize = min(max($len, 4), 40);
|
||||||
// can be entered, so let's be generous (20) (we could also use the
|
|
||||||
// real limits for each numeric type)
|
|
||||||
// 2004-04-07, it turned out that 20 was not generous enough
|
|
||||||
// for the maxlength
|
|
||||||
if ($is_char) {
|
|
||||||
$fieldsize = (($len > 40) ? 40 : $len);
|
|
||||||
$maxlength = $len;
|
|
||||||
} else {
|
|
||||||
$fieldsize = 20;
|
|
||||||
$maxlength = 99;
|
|
||||||
} // end if... else...
|
|
||||||
?>
|
?>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
@@ -938,7 +923,6 @@ foreach ($loop_array as $vrowcount => $vrow) {
|
|||||||
?>
|
?>
|
||||||
<input type="text" name="fields<?php echo $field_name_appendix; ?>"
|
<input type="text" name="fields<?php echo $field_name_appendix; ?>"
|
||||||
value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>"
|
value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>"
|
||||||
maxlength="<?php echo $maxlength; ?>"
|
|
||||||
class="textfield" <?php echo $unnillify_trigger; ?>
|
class="textfield" <?php echo $unnillify_trigger; ?>
|
||||||
tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"
|
tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"
|
||||||
id="field_<?php echo ($idindex); ?>_3" />
|
id="field_<?php echo ($idindex); ?>_3" />
|
||||||
|
Reference in New Issue
Block a user