summaryrefslogtreecommitdiff
path: root/modules/help.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-08-14 07:22:39 +0000
committerDries Buytaert <dries@buytaert.net>2004-08-14 07:22:39 +0000
commita3bd80b2677ad9890f2d2070f050d37db38431bc (patch)
treefc1551ab8224cd6d17ed4d13e82f2dccdcc85ac0 /modules/help.module
parent334f24b44893bdce0550ff4741d5609c73572113 (diff)
downloadbrdo-a3bd80b2677ad9890f2d2070f050d37db38431bc.tar.gz
brdo-a3bd80b2677ad9890f2d2070f050d37db38431bc.tar.bz2
- Patch by Al: don't translate all help text upon every page view!
Diffstat (limited to 'modules/help.module')
-rw-r--r--modules/help.module16
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/help.module b/modules/help.module
index d223d006a..5c68212df 100644
--- a/modules/help.module
+++ b/modules/help.module
@@ -13,12 +13,11 @@ function help_menu() {
foreach (module_list() as $name) {
if (module_hook($name, 'help')) {
- if (module_invoke($name, 'help', "admin/help#$name")) {
- $items[] = array('path' => 'admin/help/' . $name,
- 'title' => t($name),
- 'callback' => 'help_page',
- 'access' => user_access('access administration pages'));
- }
+ $items[] = array('path' => 'admin/help/' . $name,
+ 'title' => t($name),
+ 'callback' => 'help_page',
+ 'type' => MENU_CALLBACK,
+ 'access' => user_access('access administration pages'));
}
}
return $items;
@@ -84,7 +83,10 @@ function help_page() {
$name = arg(2);
if (module_hook($name, 'help')) {
$temp = module_invoke($name, 'help', "admin/help#$name");
- if (!empty($temp)) {
+ if (empty($temp)) {
+ $output .= t("No help is available for module %module.", array('%module' => $name));
+ }
+ else {
$output .= $temp;
}
}