Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
900fc402
Commit
900fc402
authored
Oct 24, 2007
by
Gábor Hojtsy
Browse files
#177497
reverted - caused fatal problems with modules using menu_set_location()
parent
bad3e241
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/menu.inc
View file @
900fc402
...
...
@@ -267,46 +267,17 @@ function menu_unserialize($data, $map) {
}
}
/**
*
Replaces the statically cached item for a given
path.
*
Get the menu callback for the a
path.
*
* @param $path
* The path.
* @param $router_item
* The router item. Usually you take a router entry from menu_get_item and
* set it back either modified or to a different path. This lets you modify the
* navigation block, the page title, the breadcrumb and the page help in one
* call.
* A path, or NULL for the current path
*/
function
menu_set_item
(
$path
,
$router_item
)
{
menu_get_item
(
$path
,
$router_item
);
}
/**
* Get a router item.
*
* @param $path
* The path, for example node/5. The function will find the corresponding
* node/% item and return that.
* @param $router_item
* Internal use only.
* @return
* The router item, an associate array corresponding to one row in the
* menu_router table. The value of key map holds the loaded objects. The
* value of key access is TRUE if the current user can access this page.
* The values for key title, page_arguments, access_arguments will be
* filled in based on the database values and the objects loaded.
*/
function
menu_get_item
(
$path
=
NULL
,
$router_item
=
NULL
)
{
function
menu_get_item
(
$path
=
NULL
)
{
static
$router_items
;
if
(
!
isset
(
$path
))
{
$path
=
$_GET
[
'q'
];
}
if
(
isset
(
$router_item
))
{
$router_items
[
$path
]
=
$router_item
;
}
if
(
!
isset
(
$router_items
[
$path
]))
{
$original_map
=
arg
(
NULL
,
$path
);
$parts
=
array_slice
(
$original_map
,
0
,
MENU_MAX_PARTS
);
...
...
@@ -1414,6 +1385,9 @@ function menu_get_active_trail() {
return
menu_set_active_trail
();
}
function
menu_set_location
()
{
}
/**
* Get the breadcrumb for the current page, as determined by the active trail.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment