Commit 610bc6f7 authored by webchick's avatar webchick

#326210 by AlexisWhite and jhedstrom: Pass ->menu by reference to allow modules to modify it.

parent 2c381622
......@@ -366,7 +366,7 @@ function menu_item_delete_submit($form, &$form_state) {
* Process menu and menu item add/edit form submissions.
*/
function menu_edit_item_submit($form, &$form_state) {
$item = $form_state['values']['menu'];
$item = &$form_state['values']['menu'];
// The value of "hidden" is the opposite of the value
// supplied by the "enabled" checkbox.
......
......@@ -293,7 +293,7 @@ function menu_block_view($delta = '') {
*/
function menu_nodeapi_insert(&$node) {
if (isset($node->menu)) {
$item = $node->menu;
$item = &$node->menu;
if (!empty($item['delete'])) {
menu_link_delete($item['mlid']);
}
......@@ -315,7 +315,7 @@ function menu_nodeapi_insert(&$node) {
*/
function menu_nodeapi_update(&$node) {
if (isset($node->menu)) {
$item = $node->menu;
$item = &$node->menu;
if (!empty($item['delete'])) {
menu_link_delete($item['mlid']);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment