diff options
| author | Greg Roach <fisharebest@gmail.com> | 2014-12-18 09:30:57 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2014-12-18 09:30:57 +0000 |
| commit | 1f032c31eadd2783416f36228b8aa3b7651bd666 (patch) | |
| tree | db1ed21879369032963b064d6483b9b3b4cac405 /help_text.php | |
| parent | 4a1932323ef773e77736653f1845e20e522acaa2 (diff) | |
| download | webtrees-1f032c31eadd2783416f36228b8aa3b7651bd666.tar.gz webtrees-1f032c31eadd2783416f36228b8aa3b7651bd666.tar.bz2 webtrees-1f032c31eadd2783416f36228b8aa3b7651bd666.zip | |
Fix: #322 - call module constructor to allow translation of help text
Diffstat (limited to 'help_text.php')
| -rw-r--r-- | help_text.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/help_text.php b/help_text.php index e2beb379cc..8c706e4978 100644 --- a/help_text.php +++ b/help_text.php @@ -1500,16 +1500,16 @@ case 'zip': break; default: - $title=WT_I18N::translate('Help'); - $text=WT_I18N::translate('The help text has not been written for this item.'); + $title = WT_I18N::translate('Help'); + $text = WT_I18N::translate('The help text has not been written for this item.'); // If we've been called from a module, allow the module to provide the help text $mod = WT_Filter::get('mod', '[A-Za-z0-9_]+'); - if (file_exists(WT_ROOT.WT_MODULES_DIR.$mod.'/help_text.php')) { - require WT_ROOT.WT_MODULES_DIR.$mod.'/help_text.php'; + if (array_key_exists($mod, WT_Module::getActiveModules()) && file_exists(WT_ROOT.WT_MODULES_DIR.$mod.'/help_text.php')) { + require WT_ROOT . WT_MODULES_DIR . $mod . '/help_text.php'; } break; } // This file is called by a getJSON call so return the data // in correct format header('Content-Type: application/json'); -echo json_encode(array('title'=>$title,'content'=>$text)); +echo json_encode(array('title' => $title, 'content' => $text)); |
