The branch, master has been updated
via 4a71a1e5f1eee17a5ef2349e9a62cbcab7ec4971 (commit)
from 62fd44d51e2ca500300fd992c3be4ab070f7a76c (commit)
- Log -----------------------------------------------------------------
commit 4a71a1e5f1eee17a5ef2349e9a62cbcab7ec4971
Author: Marc Delisle <marc(a)infomarc.info>
Date: Thu Dec 16 11:37:24 2010 -0500
bug #3138572 "Continue insertion" problems
-----------------------------------------------------------------------
Summary of changes:
browse_foreigners.php | 6 +++---
libraries/tbl_replace_fields.inc.php | 8 +++-----
tbl_change.php | 21 +++++++++------------
3 files changed, 15 insertions(+), 20 deletions(-)
diff --git a/browse_foreigners.php b/browse_foreigners.php
index 4cfa543..ef7cf2c 100644
--- a/browse_foreigners.php
+++ b/browse_foreigners.php
@@ -98,12 +98,12 @@ if (is_array($foreignData['disp_row'])) {
<script type="text/javascript">
//<![CDATA[
self.focus();
- function formupdate(field, key) {
+ function formupdate(fieldmd5, key) {
if (opener && opener.document && opener.document.insertForm) {
- var field = 'field_' + field;
+ var field = 'fields';
<?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 { ?>
var element_name = field + '[]';
<?php } ?>
diff --git a/libraries/tbl_replace_fields.inc.php b/libraries/tbl_replace_fields.inc.php
index 935587d..3ba08c4 100644
--- a/libraries/tbl_replace_fields.inc.php
+++ b/libraries/tbl_replace_fields.inc.php
@@ -68,8 +68,6 @@ if (false !== $possibly_uploaded_val) {
}
// $key contains the md5() of the fieldname
- $f = 'field_' . $key;
-
if (0 === strlen($val)) {
// default
$val = "''";
@@ -81,8 +79,8 @@ if (false !== $possibly_uploaded_val) {
// if we have a set, then construct the value
case 'foreign':
// if we have a foreign key, then construct the value
- if (! empty($_REQUEST[$f]['multi_edit'][$rownumber])) {
- $val = implode(',',
$_REQUEST[$f]['multi_edit'][$rownumber]);
+ if (!
empty($_REQUEST['fields']['multi_edit'][$rownumber][$key])) {
+ $val = implode(',',
$_REQUEST['fields']['multi_edit'][$rownumber][$key]);
$val = "'" . PMA_sqlAddslashes($val) .
"'";
}
break;
@@ -129,5 +127,5 @@ if (false !== $possibly_uploaded_val) {
$val = "''";
}
} // end else (field value in the form)
-unset($type, $f);
+unset($type);
?>
diff --git a/tbl_change.php b/tbl_change.php
index edbddb0..6b4446e 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -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 )
$field_name_appendix = $vkey . '[' . $field['Field_md5'] .
']';
- $field_name_appendix_md5 = $field['Field_md5'] . $vkey . '[]';
-
if ($field['Type'] == 'datetime'
&& ! isset($field['Default'])
@@ -656,9 +654,7 @@ foreach ($rows as $row_id => $vrow) {
?>
<input type="hidden" name="fields_type<?php echo
$field_name_appendix; ?>"
value="foreign" />
- <input type="hidden" 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; ?>"
+ <input type="text" name="fields<?php echo
$field_name_appendix; ?>"
class="textfield" <?php echo $unnullify_trigger; ?>
tabindex="<?php echo ($tabindex + $tabindex_for_value);
?>"
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; ?>"
value="foreign" />
- <input type="hidden" name="fields<?php echo
$field_name_appendix; ?>"
- value="" id="field_<?php echo $idindex; ?>_3A"
/>
- <select name="field_<?php echo $field_name_appendix_md5;
?>"
+ <select name="fields<?php echo $field_name_appendix; ?>"
<?php echo $unnullify_trigger; ?>
+ class="textfield"
tabindex="<?php echo ($tabindex + $tabindex_for_value);
?>"
id="field_<?php echo ($idindex); ?>_3">
<?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
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; ?>
+ class="textfield"
tabindex="<?php echo ($tabindex + $tabindex_for_value);
?>"
id="field_<?php echo ($idindex); ?>_3">
<option value=""> </option>
@@ -772,7 +768,8 @@ foreach ($rows as $row_id => $vrow) {
$j = 0;
foreach ($field_enum_values as $enum_value) {
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 ' id="field_' . ($idindex) . '_3_' . $j .
'"';
echo $unnullify_trigger;
@@ -807,8 +804,8 @@ foreach ($rows as $row_id => $vrow) {
echo $backup_field . "\n";
?>
<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="field_<?php echo $field_name_appendix_md5;
?>"
+ <select name="fields<?php echo $field_name_appendix;
?>"
+ class="textfield"
size="<?php echo $select_size; ?>"
multiple="multiple" <?php echo $unnullify_trigger;
?>
tabindex="<?php echo ($tabindex + $tabindex_for_value);
?>"
hooks/post-receive
--
phpMyAdmin
Show replies by date