From 61dbb88e15f87d111fcdc638fac03cf9177173a4 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 27 Dec 2009 15:40:00 +0000 Subject: [PATCH] Code cleanup --- server_synchronize.php | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/server_synchronize.php b/server_synchronize.php index 6312467f7..5a467614e 100644 --- a/server_synchronize.php +++ b/server_synchronize.php @@ -459,7 +459,7 @@ if ((isset($_REQUEST['submit_connect']))) {
'; echo ''; + . '" onclick ="ApplySelectedChanges(' . "'" . htmlspecialchars($_SESSION['token']) . "'" . ')" />'; echo '' . '
'; echo ''; } @@ -557,7 +557,7 @@ if (isset($_REQUEST['Table_ids'])) { /** * Applying the structure difference on selected matching tables */ - for($q = 0 ; $q < sizeof($matching_table_structure_diff); $q++) + for($q = 0; $q < sizeof($matching_table_structure_diff); $q++) { if (isset($alter_str_array[$matching_table_structure_diff[$q]])) { @@ -698,14 +698,15 @@ if (isset($_REQUEST['Table_ids'])) { if (!(in_array($uncommon_table_data_diff[$r], $uncommon_table_structure_diff))) { if (isset($uncommon_tables[$uncommon_table_data_diff[$r]])) { - PMA_createTargetTables($src_db, $trg_db, $src_link, $trg_link, $uncommon_tables, $uncommon_table_data_diff[$r], $uncommon_tables_fields, false); + PMA_createTargetTables($src_db, $trg_db, $src_link, $trg_link, $uncommon_tables, $uncommon_table_data_diff[$r], + $uncommon_tables_fields, false); $_SESSION['uncommon_tables_fields'] = $uncommon_tables_fields; unset($uncommon_tables[$uncommon_table_data_diff[$r]]); } } PMA_populateTargetTables($src_db, $trg_db, $src_link, $trg_link, $source_tables_uncommon, $uncommon_table_data_diff[$r], - $_SESSION['uncommon_tables_fields'], false); + $_SESSION['uncommon_tables_fields'], false); unset($row_count[$uncommon_table_data_diff[$r]]); } @@ -714,13 +715,13 @@ if (isset($_REQUEST['Table_ids'])) { * The differences have been removed from tables that have been synchronized */ echo '
' - . PMA_generate_common_hidden_inputs('', ''); + . PMA_generate_common_hidden_inputs('', ''); PMA_syncDisplayHeaderSource($src_db); $odd_row = false; for($i = 0; $i < count($matching_tables); $i++) { $odd_row = PMA_syncDisplayBeginTableRow($odd_row); - echo '' . $matching_tables[$i] . ' + echo '' . htmlspecialchars($matching_tables[$i]) . ' '; $num_alter_cols = 0; @@ -749,7 +750,7 @@ if (isset($_REQUEST['Table_ids'])) { echo '' . $GLOBALS['strClickToSelect'] . ''; + this ,' . "'" . htmlspecialchars($matching_tables[$i]) . "'" . ')"/>'; } if (!(in_array($i, $matching_table_data_diff))) { @@ -903,7 +904,7 @@ if (isset($_REQUEST['Table_ids'])) { echo '
'; echo ''; + onclick ="ApplySelectedChanges(' . "'" . htmlspecialchars($_SESSION['token']) . "'" .')" />'; echo '' . '
'; echo '
'; @@ -1017,14 +1018,14 @@ if (isset($_REQUEST['synchronize_db'])) { /** * Applying all sorts of differences for each matching table */ - for($p = 0; $p '; foreach ($databases as $db) { - echo ' '; + echo ' '; } echo ''; }