summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-11-29 20:36:30 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-11-29 20:36:30 +0000
commit1ce403df10a6c319a35a01a09d78cda32450dfae (patch)
tree917d1ea417585e3cd00fc700cfd85d5ded817507
parent36430b4c6411ced6cae2e954ea86dca7ff2906d4 (diff)
downloadbrdo-1ce403df10a6c319a35a01a09d78cda32450dfae.tar.gz
brdo-1ce403df10a6c319a35a01a09d78cda32450dfae.tar.bz2
#92192 by webchick. Hide empty blocks on administer by modules.
-rw-r--r--modules/system/system.module19
1 files changed, 12 insertions, 7 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index 4011ed802..a34b2fddc 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -2243,15 +2243,20 @@ function system_admin_by_module() {
}
$admin_tasks = system_get_module_admin_tasks($module);
- // Check for help links.
- if (module_invoke($module, 'help', "admin/help#$module")) {
- $admin_tasks[100] = l(t('Get help'), "admin/help/$module");
- }
- // Sort
- ksort($admin_tasks);
+ // Only display a section if there are any available tasks.
+ if (count($admin_tasks)) {
+
+ // Check for help links.
+ if (module_invoke($module, 'help', "admin/help#$module")) {
+ $admin_tasks[100] = l(t('Get help'), "admin/help/$module");
+ }
- $menu_items[$file->info['name']] = array($file->info['description'], $admin_tasks);
+ // Sort.
+ ksort($admin_tasks);
+
+ $menu_items[$file->info['name']] = array($file->info['description'], $admin_tasks);
+ }
}
return theme('system_admin_by_module', $menu_items);
}