summaryrefslogtreecommitdiff
path: root/modules/dashboard/dashboard.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-02-17 08:56:48 +0000
committerDries Buytaert <dries@buytaert.net>2010-02-17 08:56:48 +0000
commitf14395454cfdf66b7524465a6f63dbbfe0e83aa1 (patch)
treec5f4346efe3aad370eaed0f6806bf1d998e0cf51 /modules/dashboard/dashboard.module
parent8ee010911c4762c528987ba462672429786831cb (diff)
downloadbrdo-f14395454cfdf66b7524465a6f63dbbfe0e83aa1.tar.gz
brdo-f14395454cfdf66b7524465a6f63dbbfe0e83aa1.tar.bz2
- Patch #652122 by mr.baileys, Berdir, catch: dashboard should insert itself as the default local task on /admin.
Diffstat (limited to 'modules/dashboard/dashboard.module')
-rw-r--r--modules/dashboard/dashboard.module12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/dashboard/dashboard.module b/modules/dashboard/dashboard.module
index 2ca73a629..46503d19b 100644
--- a/modules/dashboard/dashboard.module
+++ b/modules/dashboard/dashboard.module
@@ -62,6 +62,18 @@ function dashboard_menu() {
}
/**
+ * Implements hook_menu_alter().
+ */
+function dashboard_menu_alter(&$items) {
+ // Make the dashboard the default local task on /admin.
+ $items['admin']['title'] = 'Dashboard';
+ $items['admin']['page callback'] = 'dashboard_admin';
+ $items['admin']['access arguments'] = array('access dashboard');
+ $items['admin/dashboard']['type'] = MENU_DEFAULT_LOCAL_TASK;
+ $items['admin/by-task']['type'] = MENU_LOCAL_TASK;
+}
+
+/**
* Implements hook_block_info_alter().
*
* Skip rendering dashboard blocks when not on the dashboard page itself. This