#326210 by AlexisWhite and jhedstrom: Pass ->menu by reference to allow modules to modify it.
parent
2c381622a5
commit
610bc6f7ed
|
@ -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']);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue