summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-11-11 22:39:59 +0000
committerDries Buytaert <dries@buytaert.net>2008-11-11 22:39:59 +0000
commit59ece2e39d28ba6052ea67d7770297b93a29d243 (patch)
tree212d76aad3f27766f0fc60540d8fa0e828b820b1 /modules/system
parent9d631d22f920796287041408dd8cf090370bac72 (diff)
downloadbrdo-59ece2e39d28ba6052ea67d7770297b93a29d243.tar.gz
brdo-59ece2e39d28ba6052ea67d7770297b93a29d243.tar.bz2
- Patch #325665 by chx, Damien Tournoud, justinrandell et al: improved the cache registry lookups.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.admin.inc2
-rw-r--r--modules/system/system.module4
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 03db7b683..fe94ba191 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -657,7 +657,7 @@ function system_modules($form_state = array()) {
}
}
// Generate link for module's help page, if there is one.
- if ($help_arg && module_hook($filename, 'help')) {
+ if ($help_arg && $module->status && in_array($filename, module_implements('help'))) {
if (module_invoke($filename, 'help', "admin/help#$filename", $help_arg)) {
// Module has a help page.
$extra['help'] = theme('more_help_link', url("admin/help/$filename"));
diff --git a/modules/system/system.module b/modules/system/system.module
index 48ac89a63..b4f796986 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1398,12 +1398,12 @@ function system_get_module_admin_tasks($module) {
$admin_tasks = array();
$admin_task_count = 0;
// Check for permissions.
- if (module_hook($module, 'perm') && $admin_access) {
+ if (in_array($module, module_implements('perm')) && $admin_access) {
$admin_tasks[-1] = l(t('Configure permissions'), 'admin/user/permissions', array('fragment' => 'module-' . $module));
}
// Check for menu items that are admin links.
- if ($menu = module_invoke($module, 'menu')) {
+ if (in_array($module, module_implements('menu')) && $menu = module_invoke($module, 'menu')) {
foreach (array_keys($menu) as $path) {
if (isset($items[$path])) {
$admin_tasks[$items[$path]['title'] . $admin_task_count ++] = l($items[$path]['title'], $path);