From 314895bdafb86f46831ea8e76d5345c23461fcc9 Mon Sep 17 00:00:00 2001 From: filip Date: Thu, 17 Jul 2014 21:47:13 +0200 Subject: added caching to improve report speed for the production instance too --- langs/report.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'langs/report.php') diff --git a/langs/report.php b/langs/report.php index d53e9a0f2..99dffe6ed 100644 --- a/langs/report.php +++ b/langs/report.php @@ -57,14 +57,6 @@ $restore_resources = TRUE; } else { $enFiles = array_merge(array('../_nav/langs/en.pot'), get_lang_references('*.lang'), get_lang_references('*.pot')); // added navigation file -/* START OF A WORKAROUND FOR TIMEOUTS */ // temporary disabling license - foreach($enFiles as $enFile) { - if ($restore_languages || ($enFile != 'en/about/license.pot')) { - $enFiles_tmp[] = $enFile; - } - } - $enFiles = $enFiles_tmp; -/* END OF A WORKAROUND FOR TIMEOUTS */ sort($enFiles); } $num_of_enFiles = count($enFiles); @@ -167,8 +159,7 @@ } if ($link == 'about/license') { require_once('../en/about/license/license.php'); - $license_array = read_license_from_vcs($l); - $license_numbers = array_pop($license_array); + $license_numbers = load_license_numbers($l, true); // reading cache $test['a'] += $license_numbers["all"]; // add aproximate number of untranslated sentences from license $num_of_untranslated_strings += $license_numbers["untran"]; // add number of all license sentences } @@ -333,7 +324,6 @@ $thfiles = '' . implode('', $lang_line) . '' . PHP_EOL; if (!$restore_languages && !$restore_resources) { - echo '

Note that license resource is currently not shown in this full report as it takes a significant amount of time to process.

'; $count = ' '; } if ($restore_languages) { @@ -372,4 +362,10 @@ S; - \ No newline at end of file +