aboutsummaryrefslogtreecommitdiffstats
path: root/langs/report_tx_git.php
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2016-09-18 15:12:47 +0200
committerfilip <filip.komar@gmail.com>2016-09-18 15:12:47 +0200
commitc220f7fd28ca39d96a467a6d7dbbbfffc54f3cc7 (patch)
tree3d105d4126eb797f493eae5b72367cce9a0f0e9e /langs/report_tx_git.php
parent66486dd700a302ba1f1d6496f24fd7261d66b153 (diff)
downloadwww-c220f7fd28ca39d96a467a6d7dbbbfffc54f3cc7.tar
www-c220f7fd28ca39d96a467a6d7dbbbfffc54f3cc7.tar.gz
www-c220f7fd28ca39d96a467a6d7dbbbfffc54f3cc7.tar.bz2
www-c220f7fd28ca39d96a467a6d7dbbbfffc54f3cc7.tar.xz
www-c220f7fd28ca39d96a467a6d7dbbbfffc54f3cc7.zip
bug fix: proper output if there are no differences in string comparison
Diffstat (limited to 'langs/report_tx_git.php')
-rw-r--r--langs/report_tx_git.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/langs/report_tx_git.php b/langs/report_tx_git.php
index ac86fefef..c7dee5b7d 100644
--- a/langs/report_tx_git.php
+++ b/langs/report_tx_git.php
@@ -355,7 +355,6 @@ if (0 < count($nonequal_num_of_all_strings)) {
// making a list of resources with Tx/git differences
ksort($tx_git_difference);
-// $all_languages_with_tx_git_diff = array();
$all_resources_with_tx_git_diff = array();
foreach ($tx_git_difference as $one_language_of_tx_git_difference => $resources_with_tx_git_difference) {
// $all_languages_with_tx_git_diff[] = $one_language_of_tx_git_difference;
@@ -365,7 +364,6 @@ foreach ($tx_git_difference as $one_language_of_tx_git_difference => $resources_
}
$all_resources_with_tx_git_diff = array_unique($all_resources_with_tx_git_diff);
sort($all_resources_with_tx_git_diff, SORT_STRING);
-$num_of_resources_w_difference = count($all_resources_with_tx_git_diff);
// preparing a detailed strings difference html table represantation between git and tx
if ($details_wanted) {
@@ -416,9 +414,16 @@ if ($details_wanted) {
$table_rows[] = "</tbody>" . PHP_EOL;
$table_rows[] = "</table>" . PHP_EOL;
- $table_w_details = (0 != $num_of_differences ? implode($table_rows) : '');
+ if (0 != $num_of_differences) {
+ $table_w_details = implode($table_rows);
+ } else {
+ $table_w_details = '';
+ $all_resources_with_tx_git_diff = array();
+ }
}
+$num_of_resources_w_difference = count($all_resources_with_tx_git_diff);
+
// preparing a html table represantation of git/tx difference in number of untranslated strings
$table_difference = '';
$num_for_switch_table_to_list = 15;