aboutsummaryrefslogtreecommitdiffstats
path: root/langs/report_test.php
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2014-06-07 11:29:08 +0000
committerFilip Komar <filip@mageia.org>2014-06-07 11:29:08 +0000
commitfe31c40f0ad09fd061a42b26a118e33b9b7ba010 (patch)
tree343fc54194475598ac9f231d90b484052ba9243b /langs/report_test.php
parent052f3de401d8859df615c8f92fb2fc7ff5ccc98d (diff)
downloadwww-fe31c40f0ad09fd061a42b26a118e33b9b7ba010.tar
www-fe31c40f0ad09fd061a42b26a118e33b9b7ba010.tar.gz
www-fe31c40f0ad09fd061a42b26a118e33b9b7ba010.tar.bz2
www-fe31c40f0ad09fd061a42b26a118e33b9b7ba010.tar.xz
www-fe31c40f0ad09fd061a42b26a118e33b9b7ba010.zip
a workaround for navigation & license resource
Diffstat (limited to 'langs/report_test.php')
-rw-r--r--langs/report_test.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/langs/report_test.php b/langs/report_test.php
index a24a78f20..952e86a37 100644
--- a/langs/report_test.php
+++ b/langs/report_test.php
@@ -65,6 +65,14 @@
$restore_languages = FALSE;
$restore_resources = FALSE;
+ if (isset($one_language) && $one_language != 'all') {
+ $otherLangs = array('en', $one_language);
+ $restore_languages = TRUE;
+ } else {
+ $otherLangs = get_other_langs();
+ }
+ $times[] = time_debug('get_other_langs');
+
if (isset($one_resource) && $one_resource != 'all') {
$enFiles = array($one_resource);
$restore_resources = TRUE;
@@ -72,7 +80,7 @@
$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 */
foreach($enFiles as $enFile) {
- if($enFile != 'en/about/license.pot' && $enFile != '../_nav/langs/en.pot') {
+ if ($restore_languages || ($enFile != 'en/about/license.pot' && $enFile != '../_nav/langs/en.pot')) {
$enFiles_tmp[] = $enFile;
}
}
@@ -81,14 +89,8 @@
sort($enFiles);
}
$num_of_enFiles = count($enFiles);
+ $times[] = time_debug('num_of_enFiles');
- if (isset($one_language) && $one_language != 'all') {
- $otherLangs = array('en', $one_language);
- $restore_languages = TRUE;
- } else {
- $otherLangs = get_other_langs();
- }
- $times[] = time_debug('get_other_langs');
$enStringsCount = array();
$report = array();
@@ -369,6 +371,10 @@
}
$thfiles = '<th>' . implode('</th><th>', $lang_line) . '</th>' . PHP_EOL;
+ if (!$restore_languages && !$restore_resources) {
+ echo '<p>Note that <a href="?r=../_nav/langs/en.pot" title="navigation resource">navigation resource</a> and <a href="?r=en/about/license.pot" title="license resource">license resource</a> are currently not shown in this full report as they take a significant amount of time to process.</p>';
+ $count = '&nbsp;';
+ }
if ($restore_languages) {
echo '<p>Restore <a href="?l=all" title="see all languages">all languages</a>.</p>';
$count = '&nbsp;';