The branch, master has been updated via 9978dddea23153eaa11e03c1c7145729a5e58229 (commit) from 20925728e7266ee877049bffe4824b720c4b1549 (commit)
- Log ----------------------------------------------------------------- commit 9978dddea23153eaa11e03c1c7145729a5e58229 Author: Michal Čihař michal@cihar.com Date: Thu Apr 22 20:22:53 2010 +0200
Avoid duplicate testing if array element is set.
-----------------------------------------------------------------------
Summary of changes: server_synchronize.php | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/server_synchronize.php b/server_synchronize.php index ba905d3..b263ba2 100644 --- a/server_synchronize.php +++ b/server_synchronize.php @@ -290,28 +290,24 @@ if ((isset($_REQUEST['submit_connect']))) { */ if (isset($update_array[$i])) { if (isset($update_array[$i][0][$matching_tables_keys[$i][0]])) { - if (isset($update_array[$i])) { - $num_of_updates = sizeof($update_array[$i]); - } else { - $num_of_updates = 0; - } + $num_of_updates = sizeof($update_array[$i]); } else { - $num_of_updates = 0; + $num_of_updates = 0; } + } else { + $num_of_updates = 0; } /** * Calculating the number of insertions for each matching table */ if (isset($insert_array[$i])) { if (isset($insert_array[$i][0][$matching_tables_keys[$i][0]])) { - if (isset($insert_array[$i])) { - $num_of_insertions = sizeof($insert_array[$i]); - } else { - $num_of_insertions = 0; - } + $num_of_insertions = sizeof($insert_array[$i]); } else { $num_of_insertions = 0; } + } else { + $num_of_insertions = 0; } /** * Displays the name of the matching table
hooks/post-receive