summaryrefslogtreecommitdiffstats
path: root/inc/dictionary.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2016-06-09 16:06:07 +0200
committerSimon Rettberg2016-06-09 16:06:32 +0200
commitab546fefa2b7e8339d35585aa55da30ce6bece1d (patch)
tree7a255b93492628efaba944bf00fb09cfbed24206 /inc/dictionary.inc.php
parentfixed some minor things. (diff)
downloadslx-admin-ab546fefa2b7e8339d35585aa55da30ce6bece1d.tar.gz
slx-admin-ab546fefa2b7e8339d35585aa55da30ce6bece1d.tar.xz
slx-admin-ab546fefa2b7e8339d35585aa55da30ce6bece1d.zip
[dictionary] Handle case where we have no Page
Diffstat (limited to 'inc/dictionary.inc.php')
-rw-r--r--inc/dictionary.inc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php
index 6ae8fb9b..01651b88 100644
--- a/inc/dictionary.inc.php
+++ b/inc/dictionary.inc.php
@@ -79,7 +79,8 @@ class Dictionary
public static function translateFile($path, $tag)
{
- // TODO: Handle case where we have no active module/no page class
+ if (!class_exists('Page') || Page::getModule() === false)
+ return false; // We have no page - return false for now, as we're most likely running in api or install mode
return self::translateFileModule(Page::getModule()->getIdentifier(), $path, $tag);
}