bug #3138572 "Continue insertion" problems
This commit is contained in:
@@ -98,12 +98,12 @@ if (is_array($foreignData['disp_row'])) {
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
self.focus();
|
self.focus();
|
||||||
function formupdate(field, key) {
|
function formupdate(fieldmd5, key) {
|
||||||
if (opener && opener.document && opener.document.insertForm) {
|
if (opener && opener.document && opener.document.insertForm) {
|
||||||
var field = 'field_' + field;
|
var field = 'fields';
|
||||||
|
|
||||||
<?php if (isset($pk)) { ?>
|
<?php if (isset($pk)) { ?>
|
||||||
var element_name = field + '[multi_edit][<?php echo htmlspecialchars($pk); ?>][]';
|
var element_name = field + '[multi_edit][<?php echo htmlspecialchars($pk); ?>][' + fieldmd5 + ']';
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
var element_name = field + '[]';
|
var element_name = field + '[]';
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
@@ -68,8 +68,6 @@ if (false !== $possibly_uploaded_val) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $key contains the md5() of the fieldname
|
// $key contains the md5() of the fieldname
|
||||||
$f = 'field_' . $key;
|
|
||||||
|
|
||||||
if (0 === strlen($val)) {
|
if (0 === strlen($val)) {
|
||||||
// default
|
// default
|
||||||
$val = "''";
|
$val = "''";
|
||||||
@@ -81,8 +79,8 @@ if (false !== $possibly_uploaded_val) {
|
|||||||
// if we have a set, then construct the value
|
// if we have a set, then construct the value
|
||||||
case 'foreign':
|
case 'foreign':
|
||||||
// if we have a foreign key, then construct the value
|
// if we have a foreign key, then construct the value
|
||||||
if (! empty($_REQUEST[$f]['multi_edit'][$rownumber])) {
|
if (! empty($_REQUEST['fields']['multi_edit'][$rownumber][$key])) {
|
||||||
$val = implode(',', $_REQUEST[$f]['multi_edit'][$rownumber]);
|
$val = implode(',', $_REQUEST['fields']['multi_edit'][$rownumber][$key]);
|
||||||
$val = "'" . PMA_sqlAddslashes($val) . "'";
|
$val = "'" . PMA_sqlAddslashes($val) . "'";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -129,5 +127,5 @@ if (false !== $possibly_uploaded_val) {
|
|||||||
$val = "''";
|
$val = "''";
|
||||||
}
|
}
|
||||||
} // end else (field value in the form)
|
} // end else (field value in the form)
|
||||||
unset($type, $f);
|
unset($type);
|
||||||
?>
|
?>
|
||||||
|
@@ -411,8 +411,6 @@ foreach ($rows as $row_id => $vrow) {
|
|||||||
|
|
||||||
// Use an MD5 as an array index to avoid having special characters in the name atttibute (see bug #1746964 )
|
// Use an MD5 as an array index to avoid having special characters in the name atttibute (see bug #1746964 )
|
||||||
$field_name_appendix = $vkey . '[' . $field['Field_md5'] . ']';
|
$field_name_appendix = $vkey . '[' . $field['Field_md5'] . ']';
|
||||||
$field_name_appendix_md5 = $field['Field_md5'] . $vkey . '[]';
|
|
||||||
|
|
||||||
|
|
||||||
if ($field['Type'] == 'datetime'
|
if ($field['Type'] == 'datetime'
|
||||||
&& ! isset($field['Default'])
|
&& ! isset($field['Default'])
|
||||||
@@ -656,9 +654,7 @@ foreach ($rows as $row_id => $vrow) {
|
|||||||
?>
|
?>
|
||||||
<input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>"
|
<input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>"
|
||||||
value="foreign" />
|
value="foreign" />
|
||||||
<input type="hidden" name="fields<?php echo $field_name_appendix; ?>"
|
<input type="text" name="fields<?php echo $field_name_appendix; ?>"
|
||||||
value="" id="field_<?php echo ($idindex); ?>_3A" />
|
|
||||||
<input type="text" name="field_<?php echo $field_name_appendix_md5; ?>"
|
|
||||||
class="textfield" <?php echo $unnullify_trigger; ?>
|
class="textfield" <?php echo $unnullify_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"
|
||||||
@@ -678,10 +674,9 @@ foreach ($rows as $row_id => $vrow) {
|
|||||||
?>
|
?>
|
||||||
<input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>"
|
<input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>"
|
||||||
value="foreign" />
|
value="foreign" />
|
||||||
<input type="hidden" name="fields<?php echo $field_name_appendix; ?>"
|
<select name="fields<?php echo $field_name_appendix; ?>"
|
||||||
value="" id="field_<?php echo $idindex; ?>_3A" />
|
|
||||||
<select name="field_<?php echo $field_name_appendix_md5; ?>"
|
|
||||||
<?php echo $unnullify_trigger; ?>
|
<?php echo $unnullify_trigger; ?>
|
||||||
|
class="textfield"
|
||||||
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">
|
||||||
<?php echo PMA_foreignDropdown($foreignData['disp_row'], $foreignData['foreign_field'], $foreignData['foreign_display'], $data, $cfg['ForeignKeyMaxLimit']); ?>
|
<?php echo PMA_foreignDropdown($foreignData['disp_row'], $foreignData['foreign_field'], $foreignData['foreign_display'], $data, $cfg['ForeignKeyMaxLimit']); ?>
|
||||||
@@ -744,8 +739,9 @@ foreach ($rows as $row_id => $vrow) {
|
|||||||
// show dropdown or radio depend on length
|
// show dropdown or radio depend on length
|
||||||
if (strlen($field['Type']) > 20) {
|
if (strlen($field['Type']) > 20) {
|
||||||
?>
|
?>
|
||||||
<select name="field_<?php echo $field_name_appendix_md5; ?>"
|
<select name="fields<?php echo $field_name_appendix; ?>"
|
||||||
<?php echo $unnullify_trigger; ?>
|
<?php echo $unnullify_trigger; ?>
|
||||||
|
class="textfield"
|
||||||
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">
|
||||||
<option value=""> </option>
|
<option value=""> </option>
|
||||||
@@ -772,7 +768,8 @@ foreach ($rows as $row_id => $vrow) {
|
|||||||
$j = 0;
|
$j = 0;
|
||||||
foreach ($field_enum_values as $enum_value) {
|
foreach ($field_enum_values as $enum_value) {
|
||||||
echo ' ';
|
echo ' ';
|
||||||
echo '<input type="radio" name="field_' . $field_name_appendix_md5 . '"';
|
echo '<input type="radio" name="fields' . $field_name_appendix . '"';
|
||||||
|
echo ' class="textfield"';
|
||||||
echo ' value="' . $enum_value['html'] . '"';
|
echo ' value="' . $enum_value['html'] . '"';
|
||||||
echo ' id="field_' . ($idindex) . '_3_' . $j . '"';
|
echo ' id="field_' . ($idindex) . '_3_' . $j . '"';
|
||||||
echo $unnullify_trigger;
|
echo $unnullify_trigger;
|
||||||
@@ -807,8 +804,8 @@ foreach ($rows as $row_id => $vrow) {
|
|||||||
echo $backup_field . "\n";
|
echo $backup_field . "\n";
|
||||||
?>
|
?>
|
||||||
<input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>" value="set" />
|
<input type="hidden" name="fields_type<?php echo $field_name_appendix; ?>" value="set" />
|
||||||
<input type="hidden" name="fields<?php echo $field_name_appendix; ?>" value="" />
|
<select name="fields<?php echo $field_name_appendix; ?>"
|
||||||
<select name="field_<?php echo $field_name_appendix_md5; ?>"
|
class="textfield"
|
||||||
size="<?php echo $select_size; ?>"
|
size="<?php echo $select_size; ?>"
|
||||||
multiple="multiple" <?php echo $unnullify_trigger; ?>
|
multiple="multiple" <?php echo $unnullify_trigger; ?>
|
||||||
tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"
|
tabindex="<?php echo ($tabindex + $tabindex_for_value); ?>"
|
||||||
|
Reference in New Issue
Block a user