Skip to content
Snippets Groups Projects
Commit 76ea0a94 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#133092 by wmostrey: hide help page links when help module is not enabled, so...

#133092 by wmostrey: hide help page links when help module is not enabled, so the links lead to 404s
parent 60862d61
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -91,7 +91,7 @@ function system_admin_by_module() { ...@@ -91,7 +91,7 @@ function system_admin_by_module() {
$modules = module_rebuild_cache(); $modules = module_rebuild_cache();
$menu_items = array(); $menu_items = array();
$help_arg = drupal_help_arg(); $help_arg = module_exists('help') ? drupal_help_arg() : FALSE;
foreach ($modules as $file) { foreach ($modules as $file) {
$module = $file->name; $module = $file->name;
...@@ -105,7 +105,7 @@ function system_admin_by_module() { ...@@ -105,7 +105,7 @@ function system_admin_by_module() {
if (count($admin_tasks)) { if (count($admin_tasks)) {
// Check for help links. // Check for help links.
if (module_invoke($module, 'help', "admin/help#$module", $help_arg)) { if ($help_arg && module_invoke($module, 'help', "admin/help#$module", $help_arg)) {
$admin_tasks[100] = l(t('Get help'), "admin/help/$module"); $admin_tasks[100] = l(t('Get help'), "admin/help/$module");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment