The branch, master has been updated via 2d68ee897442173789e6254d435c6d7195d239f3 (commit) from cc7fe02f3020a90f4ab6aea177879a621a3662fa (commit)
- Log ----------------------------------------------------------------- commit 2d68ee897442173789e6254d435c6d7195d239f3 Author: Marc Delisle marc@infomarc.info Date: Sun Dec 5 07:14:52 2010 -0500
clarify variable name
-----------------------------------------------------------------------
Summary of changes: libraries/tbl_replace_fields.inc.php | 6 +++--- tbl_replace.php | 34 +++++++++++++++++----------------- 2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/libraries/tbl_replace_fields.inc.php b/libraries/tbl_replace_fields.inc.php index 824d5bc..935587d 100644 --- a/libraries/tbl_replace_fields.inc.php +++ b/libraries/tbl_replace_fields.inc.php @@ -46,7 +46,7 @@ require_once './libraries/common.inc.php'; require_once './libraries/File.class.php';
$file_to_insert = new PMA_File(); -$file_to_insert->checkTblChangeForm($key, $rowcount); +$file_to_insert->checkTblChangeForm($key, $rownumber);
$possibly_uploaded_val = $file_to_insert->getContent();
@@ -81,8 +81,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'][$rowcount])) { - $val = implode(',', $_REQUEST[$f]['multi_edit'][$rowcount]); + if (! empty($_REQUEST[$f]['multi_edit'][$rownumber])) { + $val = implode(',', $_REQUEST[$f]['multi_edit'][$rownumber]); $val = "'" . PMA_sqlAddslashes($val) . "'"; } break; diff --git a/tbl_replace.php b/tbl_replace.php index 7a6ff26..f7371ec 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -167,7 +167,7 @@ $func_no_param = array( 'CURRENT_USER', );
-foreach ($loop_array as $rowcount => $where_clause) { +foreach ($loop_array as $rownumber => $where_clause) { // skip fields to be ignored if (! $using_key && isset($_REQUEST['insert_ignore_' . $where_clause])) { continue; @@ -178,36 +178,36 @@ foreach ($loop_array as $rowcount => $where_clause) {
// Map multi-edit keys to single-level arrays, dependent on how we got the fields $me_fields = - isset($_REQUEST['fields']['multi_edit'][$rowcount]) - ? $_REQUEST['fields']['multi_edit'][$rowcount] + isset($_REQUEST['fields']['multi_edit'][$rownumber]) + ? $_REQUEST['fields']['multi_edit'][$rownumber] : array(); $me_fields_name = - isset($_REQUEST['fields_name']['multi_edit'][$rowcount]) - ? $_REQUEST['fields_name']['multi_edit'][$rowcount] + isset($_REQUEST['fields_name']['multi_edit'][$rownumber]) + ? $_REQUEST['fields_name']['multi_edit'][$rownumber] : null; $me_fields_prev = - isset($_REQUEST['fields_prev']['multi_edit'][$rowcount]) - ? $_REQUEST['fields_prev']['multi_edit'][$rowcount] + isset($_REQUEST['fields_prev']['multi_edit'][$rownumber]) + ? $_REQUEST['fields_prev']['multi_edit'][$rownumber] : null; $me_funcs = - isset($_REQUEST['funcs']['multi_edit'][$rowcount]) - ? $_REQUEST['funcs']['multi_edit'][$rowcount] + isset($_REQUEST['funcs']['multi_edit'][$rownumber]) + ? $_REQUEST['funcs']['multi_edit'][$rownumber] : null; $me_fields_type = - isset($_REQUEST['fields_type']['multi_edit'][$rowcount]) - ? $_REQUEST['fields_type']['multi_edit'][$rowcount] + isset($_REQUEST['fields_type']['multi_edit'][$rownumber]) + ? $_REQUEST['fields_type']['multi_edit'][$rownumber] : null; $me_fields_null = - isset($_REQUEST['fields_null']['multi_edit'][$rowcount]) - ? $_REQUEST['fields_null']['multi_edit'][$rowcount] + isset($_REQUEST['fields_null']['multi_edit'][$rownumber]) + ? $_REQUEST['fields_null']['multi_edit'][$rownumber] : null; $me_fields_null_prev = - isset($_REQUEST['fields_null_prev']['multi_edit'][$rowcount]) - ? $_REQUEST['fields_null_prev']['multi_edit'][$rowcount] + isset($_REQUEST['fields_null_prev']['multi_edit'][$rownumber]) + ? $_REQUEST['fields_null_prev']['multi_edit'][$rownumber] : null; $me_auto_increment = - isset($_REQUEST['auto_increment']['multi_edit'][$rowcount]) - ? $_REQUEST['auto_increment']['multi_edit'][$rowcount] + isset($_REQUEST['auto_increment']['multi_edit'][$rownumber]) + ? $_REQUEST['auto_increment']['multi_edit'][$rownumber] : null;
// Fetch the current values of a row to use in case we have a protected field
hooks/post-receive