aboutsummaryrefslogtreecommitdiffstats
path: root/langs/report.php
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2014-07-17 21:47:13 +0200
committerfilip <filip.komar@gmail.com>2014-07-17 21:47:13 +0200
commit314895bdafb86f46831ea8e76d5345c23461fcc9 (patch)
tree3047988bbf3dd03b8e06b1693c66a502bdf78692 /langs/report.php
parent640dfe1d371f52819e46b76b120d0f9914412131 (diff)
downloadwww-314895bdafb86f46831ea8e76d5345c23461fcc9.tar
www-314895bdafb86f46831ea8e76d5345c23461fcc9.tar.gz
www-314895bdafb86f46831ea8e76d5345c23461fcc9.tar.bz2
www-314895bdafb86f46831ea8e76d5345c23461fcc9.tar.xz
www-314895bdafb86f46831ea8e76d5345c23461fcc9.zip
added caching to improve report speed for the production instance too
Diffstat (limited to 'langs/report.php')
-rw-r--r--langs/report.php20
1 files changed, 8 insertions, 12 deletions
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 = '<th>' . implode('</th><th>', $lang_line) . '</th>' . PHP_EOL;
if (!$restore_languages && !$restore_resources) {
- echo '<p>Note that <a href="?r=en/about/license.pot" title="license resource">license resource</a> is currently not shown in this full report as it takes a significant amount of time to process.</p>';
$count = '&nbsp;';
}
if ($restore_languages) {
@@ -372,4 +362,10 @@ S;
</div>
<script src="/_nav/js/source.js"></script>
</body>
-</html> \ No newline at end of file
+</html><?php
+
+// regenerating cache
+// TODO move it to the cron
+foreach ($otherLangs as $lang) {
+ load_license_numbers($lang);
+} \ No newline at end of file