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

merge-requests/26/head
Angie Byron 2009-01-31 16:56:00 +00:00
parent 2c381622a5
commit 610bc6f7ed
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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']);
}