summaryrefslogtreecommitdiff
path: root/includes/menu.inc
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-09-06 12:47:20 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-09-06 12:47:20 +0000
commit9307321817e60ad649a6e166ddaacc7307b333e7 (patch)
tree801f110956a679861372241839c977ab0cc648ad /includes/menu.inc
parentc3685d60f70b6a37bb5a47f92fb35c00364a95df (diff)
downloadbrdo-9307321817e60ad649a6e166ddaacc7307b333e7.tar.gz
brdo-9307321817e60ad649a6e166ddaacc7307b333e7.tar.bz2
#148677 by pwolanin: set active menu item on 403/404 pages (and on the user page)
Diffstat (limited to 'includes/menu.inc')
-rw-r--r--includes/menu.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index 95fe9da69..db3d1e6ad 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1240,7 +1240,18 @@ function menu_get_active_menu_name() {
return menu_set_active_menu_name();
}
-function menu_set_active_item() {
+/**
+ * Set the active path, which determines which page is loaded.
+ *
+ * @param $path
+ * A Drupal path - not a path alias.
+ *
+ * Note that this may not have the desired effect unless invoked very early
+ * in the page load, such as during hook_boot, or unless you call
+ * menu_execute_active_handler() to generate your page output.
+ */
+function menu_set_active_item($path) {
+ $_GET['q'] = $path;
}
/**