diff options
author | Simon Rettberg | 2016-08-29 16:57:38 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-08-29 16:57:38 +0200 |
commit | 1ea14f191d4ddd51e2df8ea30e4e3ca24734d172 (patch) | |
tree | e4e484c0077ea5a1c4f9cc00049655232904be11 /modules-available/baseconfig_bwlp/hooks/translation.inc.php | |
parent | make roomplanner 100% even on big screens and fix bug. (diff) | |
download | slx-admin-1ea14f191d4ddd51e2df8ea30e4e3ca24734d172.tar.gz slx-admin-1ea14f191d4ddd51e2df8ea30e4e3ca24734d172.tar.xz slx-admin-1ea14f191d4ddd51e2df8ea30e4e3ca24734d172.zip |
[baseconfig*] Fix translation hook to only consider the current module
Diffstat (limited to 'modules-available/baseconfig_bwlp/hooks/translation.inc.php')
-rw-r--r-- | modules-available/baseconfig_bwlp/hooks/translation.inc.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules-available/baseconfig_bwlp/hooks/translation.inc.php b/modules-available/baseconfig_bwlp/hooks/translation.inc.php index 7588fe38..00898075 100644 --- a/modules-available/baseconfig_bwlp/hooks/translation.inc.php +++ b/modules-available/baseconfig_bwlp/hooks/translation.inc.php @@ -18,8 +18,9 @@ $HANDLER['subsections'] = array( * Configuration categories */ $HANDLER['grep_config-variable-categories'] = function($module) { - $module->activate(); - $want = BaseConfigUtil::getCategories(); + if (!$module->activate()) + return array(); + $want = BaseConfigUtil::getCategories($module); foreach ($want as &$entry) { $entry = true; } @@ -30,8 +31,9 @@ $HANDLER['grep_config-variable-categories'] = function($module) { * Configuration variables */ $HANDLER['grep_config-variables'] = function($module) { - $module->activate(); - $want = BaseConfigUtil::getVariables(); + if (!$module->activate()) + return array(); + $want = BaseConfigUtil::getVariables($module); foreach ($want as &$entry) { $entry = true; } |