The branch, master has been updated via 87590bc79508ab7c864d6ca3708cb583bc178bf8 (commit) from c1f536637b6d7a8b8a5bacef6baa4f779100942d (commit)
- Log ----------------------------------------------------------------- commit 87590bc79508ab7c864d6ca3708cb583bc178bf8 Author: Michal Čihař michal@cihar.com Date: Thu Apr 22 20:25:57 2010 +0200
Clarify code for calculating number of updates/inserts.
-----------------------------------------------------------------------
Summary of changes: server_synchronize.php | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/server_synchronize.php b/server_synchronize.php index afa7cce..4467a31 100644 --- a/server_synchronize.php +++ b/server_synchronize.php @@ -283,14 +283,14 @@ if ((isset($_REQUEST['submit_connect']))) { * Display the matching tables' names and difference, first */ for($i = 0; $i < count($matching_tables); $i++) { - $num_of_updates = 0; - $num_of_insertions = 0; /** * Calculating the number of updates for each matching table */ if (isset($update_array[$i]) && isset($update_array[$i][0]) && isset($update_array[$i][0][$matching_tables_keys[$i][0]])) { $num_of_updates = sizeof($update_array[$i]); + } else { + $num_of_updates = 0; } /** * Calculating the number of insertions for each matching table @@ -298,6 +298,8 @@ if ((isset($_REQUEST['submit_connect']))) { if (isset($insert_array[$i]) && isset($insert_array[$i][0]) && isset($insert_array[$i][0][$matching_tables_keys[$i][0]])) { $num_of_insertions = sizeof($insert_array[$i]); + } else { + $num_of_insertions = 0; } /** * Displays the name of the matching table
hooks/post-receive