Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhura Jayaratne <madhura.cj@gmail.com>2012-01-22 10:40:44 +0400
committerMadhura Jayaratne <madhura.cj@gmail.com>2012-01-22 10:40:44 +0400
commitf5ffad3583fd436381b3ced82b8aa1d4ae75f2a0 (patch)
treeeea716a4e82e4bb2f242ed45bde41761e2f8933b /tbl_replace.php
parent48b951996997742574fbe2935f51a56e56986e7f (diff)
parent3c7b233d9c83b501f5e220a6dcba8259b7554a87 (diff)
Merge branch 'QA_3_4'
Conflicts: libraries/tbl_replace_fields.inc.php
Diffstat (limited to 'tbl_replace.php')
-rw-r--r--tbl_replace.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/tbl_replace.php b/tbl_replace.php
index 8b8a58d050..6ba156de56 100644
--- a/tbl_replace.php
+++ b/tbl_replace.php
@@ -223,7 +223,7 @@ foreach ($loop_array as $rownumber => $where_clause) {
if ($is_insert && $using_key && isset($me_fields_type) && is_array($me_fields_type) && isset($where_clause)) {
$prot_row = PMA_DBI_fetch_single_row('SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . $where_clause . ';');
}
-
+
// When a select field is nullified, it's not present in $_REQUEST
// so initialize it; this way, the foreach($me_fields) will process it
foreach ($me_fields_name as $key => $val) {
@@ -232,7 +232,10 @@ foreach ($loop_array as $rownumber => $where_clause) {
}
}
- foreach ($me_fields as $key => $val) {
+ // Iterate in the order of $me_fields_name, not $me_fields, to avoid problems
+ // when inserting multiple entries
+ foreach ($me_fields_name as $key => $field_name) {
+ $val = $me_fields[$key];
// Note: $key is an md5 of the fieldname. The actual fieldname is available in $me_fields_name[$key]