aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--langs/report.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/langs/report.php b/langs/report.php
index bb14bd3e6..74bc56f68 100644
--- a/langs/report.php
+++ b/langs/report.php
@@ -48,18 +48,24 @@
$one_language_all_resources = FALSE;
$all_languages_only_one_resource = FALSE;
+ $otherLangs = get_other_langs();
if (isset($one_language) && $one_language != 'all') {
- $one_language_all_resources = TRUE;
- $otherLangs = array('en', $one_language);
- } else {
- $otherLangs = get_other_langs();
+ if (in_array($one_language, $otherLangs)) {
+ $one_language_all_resources = TRUE;
+ $otherLangs = array('en', $one_language);
+ } else {
+ echo "<p>Language $one_language is not present in our web site yet.</p>";
+ }
}
+ $enFiles = array_merge(array('../_nav/langs/en.pot'), get_lang_references('*.pot')); // added navigation file
if (isset($one_resource) && $one_resource != 'all') {
- $all_languages_only_one_resource = TRUE;
- $enFiles = array($one_resource);
- } else {
- $enFiles = array_merge(array('../_nav/langs/en.pot'), get_lang_references('*.pot')); // added navigation file
+ if (in_array($one_resource, $enFiles)) {
+ $all_languages_only_one_resource = TRUE;
+ $enFiles = array($one_resource);
+ } else {
+ echo "<p>Resource $one_resource is not present in our web site yet.</p>";
+ }
}
$num_of_enFiles = count($enFiles);