Fix for bug #3350790 - JS error in Table->Structure->Index->Edit
This commit is contained in:
@@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog
|
|||||||
- bug #3348995 [config] $cfg['Export']['asfile'] set to false does not select asText option
|
- bug #3348995 [config] $cfg['Export']['asfile'] set to false does not select asText option
|
||||||
- bug #3340151 [export] Working SQL query exports error page
|
- bug #3340151 [export] Working SQL query exports error page
|
||||||
- bug #3353649 [interface] "Create an index on X columns" form not validated
|
- bug #3353649 [interface] "Create an index on X columns" form not validated
|
||||||
|
- bug #3350790 [interface] JS error in Table->Structure->Index->Edit
|
||||||
|
|
||||||
3.4.3.1 (2011-07-02)
|
3.4.3.1 (2011-07-02)
|
||||||
- [security] Fixed possible session manipulation in swekey authentication, see PMASA-2011-5
|
- [security] Fixed possible session manipulation in swekey authentication, see PMASA-2011-5
|
||||||
|
@@ -17,24 +17,24 @@ function checkIndexName()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Gets the elements pointers
|
// Gets the elements pointers
|
||||||
var the_idx_name = document.forms['index_frm'].elements['index'];
|
var the_idx_name = document.forms['index_frm'].elements['index[Key_name]'];
|
||||||
var the_idx_type = document.forms['index_frm'].elements['index_type'];
|
var the_idx_type = document.forms['index_frm'].elements['index[Index_type]'];
|
||||||
|
|
||||||
// Index is a primary key
|
// Index is a primary key
|
||||||
if (the_idx_type.options[0].value == 'PRIMARY' && the_idx_type.options[0].selected) {
|
if (the_idx_type.options[0].value == 'PRIMARY' && the_idx_type.options[0].selected) {
|
||||||
document.forms['index_frm'].elements['index'].value = 'PRIMARY';
|
document.forms['index_frm'].elements['index[Key_name]'].value = 'PRIMARY';
|
||||||
if (typeof(the_idx_name.disabled) != 'undefined') {
|
if (typeof(the_idx_name.disabled) != 'undefined') {
|
||||||
document.forms['index_frm'].elements['index'].disabled = true;
|
document.forms['index_frm'].elements['index[Key_name]'].disabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Other cases
|
// Other cases
|
||||||
else {
|
else {
|
||||||
if (the_idx_name.value == 'PRIMARY') {
|
if (the_idx_name.value == 'PRIMARY') {
|
||||||
document.forms['index_frm'].elements['index'].value = '';
|
document.forms['index_frm'].elements['index[Key_name]'].value = '';
|
||||||
}
|
}
|
||||||
if (typeof(the_idx_name.disabled) != 'undefined') {
|
if (typeof(the_idx_name.disabled) != 'undefined') {
|
||||||
document.forms['index_frm'].elements['index'].disabled = false;
|
document.forms['index_frm'].elements['index[Key_name]'].disabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -133,8 +133,8 @@ if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<form action="./tbl_indexes.php" method="post" name="index_frm"
|
<form action="./tbl_indexes.php" method="post" name="index_frm"
|
||||||
onsubmit="if (typeof(this.elements['index'].disabled) != 'undefined') {
|
onsubmit="if (typeof(this.elements['index[Key_name]'].disabled) != 'undefined') {
|
||||||
this.elements['index'].disabled = false}">
|
this.elements['index[Key_name]'].disabled = false}">
|
||||||
<?php
|
<?php
|
||||||
$form_params = array(
|
$form_params = array(
|
||||||
'db' => $db,
|
'db' => $db,
|
||||||
|
Reference in New Issue
Block a user