The branch, master has been updated via a7b1a56b28908a526a3b5ecdd001bf0648996869 (commit) from f1c526f17a7e0307fa9bcc52d40c643cb0dafff8 (commit)
- Log ----------------------------------------------------------------- commit a7b1a56b28908a526a3b5ecdd001bf0648996869 Author: Michal Čihař mcihar@suse.cz Date: Thu Jul 21 13:09:30 2011 +0200
Fix indentation
-----------------------------------------------------------------------
Summary of changes: libraries/server_synchronize.lib.php | 64 ++++++++++++++++----------------- 1 files changed, 31 insertions(+), 33 deletions(-)
diff --git a/libraries/server_synchronize.lib.php b/libraries/server_synchronize.lib.php index ffbbea7..c04ddb2 100644 --- a/libraries/server_synchronize.lib.php +++ b/libraries/server_synchronize.lib.php @@ -174,35 +174,34 @@ function PMA_dataDiffInTables($src_db, $trg_db, $src_link, $trg_link, &$matching */ for ($m = 0; ($m < $fields_num[$matching_table_index]) && ($starting_index == 0) ; $m++) { if (isset($src_result_set[0][$fld[$m]])) { - if (isset($target_result_set[0][$fld[$m]])) { - if (($src_result_set[0][$fld[$m]] != $target_result_set[0][$fld[$m]]) && (! (in_array($fld[$m], $is_key)))) { - if (sizeof($is_key) == 1) { - if ($source_result_set[$j]) { - $update_array[$matching_table_index][$update_row][$is_key[0]] = $source_result_set[$j]; - } - } elseif (sizeof($is_key) > 1) { - for ($n=0; $n < sizeof($is_key); $n++) { - if (isset($src_result_set[0][$is_key[$n]])) { - $update_array[$matching_table_index][$update_row][$is_key[$n]] = $src_result_set[0][$is_key[$n]]; + if (isset($target_result_set[0][$fld[$m]])) { + if (($src_result_set[0][$fld[$m]] != $target_result_set[0][$fld[$m]]) && (! (in_array($fld[$m], $is_key)))) { + if (sizeof($is_key) == 1) { + if ($source_result_set[$j]) { + $update_array[$matching_table_index][$update_row][$is_key[0]] = $source_result_set[$j]; + } + } elseif (sizeof($is_key) > 1) { + for ($n=0; $n < sizeof($is_key); $n++) { + if (isset($src_result_set[0][$is_key[$n]])) { + $update_array[$matching_table_index][$update_row][$is_key[$n]] = $src_result_set[0][$is_key[$n]]; + } } } - }
- $update_array[$matching_table_index][$update_row][$update_field] = $fld[$m]; + $update_array[$matching_table_index][$update_row][$update_field] = $fld[$m];
- $update_field++; - if (isset($src_result_set[0][$fld[$m]])) { - $update_array[$matching_table_index][$update_row][$update_field] = $src_result_set[0][$fld[$m]]; $update_field++; + if (isset($src_result_set[0][$fld[$m]])) { + $update_array[$matching_table_index][$update_row][$update_field] = $src_result_set[0][$fld[$m]]; + $update_field++; + } + $starting_index = $m; + $update_row++; } - $starting_index = $m; - $update_row++; - } - } else { - if (sizeof($is_key) == 1) { + } else { + if (sizeof($is_key) == 1) { if ($source_result_set[$j]) { $update_array[$matching_table_index][$update_row][$is_key[0]] = $source_result_set[$j]; - } } elseif (sizeof($is_key) > 1) { for ($n = 0; $n < sizeof($is_key); $n++) { @@ -221,25 +220,24 @@ function PMA_dataDiffInTables($src_db, $trg_db, $src_link, $trg_link, &$matching } $starting_index = $m; $update_row++; + } } - } } - for ($m = $starting_index + 1; $m < $fields_num[$matching_table_index] ; $m++) - { + for ($m = $starting_index + 1; $m < $fields_num[$matching_table_index] ; $m++) { if (isset($src_result_set[0][$fld[$m]])) { if (isset($target_result_set[0][$fld[$m]])) { if (($src_result_set[0][$fld[$m]] != $target_result_set[0][$fld[$m]]) && (!(in_array($fld[$m], $is_key)))) { - $update_row--; - $update_array[$matching_table_index][$update_row][$update_field] = $fld[$m]; - $update_field++; - if ($src_result_set[0][$fld[$m]]) { - $update_array[$matching_table_index][$update_row][$update_field] = $src_result_set[0][$fld[$m]]; + $update_row--; + $update_array[$matching_table_index][$update_row][$update_field] = $fld[$m]; $update_field++; + if ($src_result_set[0][$fld[$m]]) { + $update_array[$matching_table_index][$update_row][$update_field] = $src_result_set[0][$fld[$m]]; + $update_field++; + } + $update_row++; } - $update_row++; - } - } else { - $update_row--; + } else { + $update_row--; $update_array[$matching_table_index][$update_row][$update_field] = $fld[$m]; $update_field++; if ($src_result_set[0][$fld[$m]]) {
hooks/post-receive