summaryrefslogtreecommitdiff
path: root/modules/menu
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-06-17 13:44:45 +0000
committerDries Buytaert <dries@buytaert.net>2010-06-17 13:44:45 +0000
commitcb043e8c489f033f7435e7fd5d18325155465c77 (patch)
tree716cdfe743aa99a01a1dce97cc800c00119af896 /modules/menu
parent3620310d7c8a5d487f7b6826a89f8a4816149333 (diff)
downloadbrdo-cb043e8c489f033f7435e7fd5d18325155465c77.tar.gz
brdo-cb043e8c489f033f7435e7fd5d18325155465c77.tar.bz2
- Patch #735800 by effulgentsia, fago, Frando: node form triggers form level submit functions on button level submits, without validation. Oh yeah.
Diffstat (limited to 'modules/menu')
-rw-r--r--modules/menu/menu.module9
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index 12381543c..9686a57bf 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -596,7 +596,6 @@ function menu_form_alter(&$form, $form_state, $form_id) {
return;
}
$link = $form['#node']->menu;
- $form['#submit'][] = 'menu_node_form_submit';
$form['menu'] = array(
'#type' => 'fieldset',
@@ -661,15 +660,13 @@ function menu_form_alter(&$form, $form_state, $form_id) {
}
/**
- * Submit handler for node form.
- *
- * @see menu_form_alter()
+ * Implements hook_node_submit().
*/
-function menu_node_form_submit($form, &$form_state) {
+function menu_node_submit($node, $form, $form_state) {
// Decompose the selected menu parent option into 'menu_name' and 'plid', if
// the form used the default parent selection widget.
if (!empty($form_state['values']['menu']['parent'])) {
- list($form_state['values']['menu']['menu_name'], $form_state['values']['menu']['plid']) = explode(':', $form_state['values']['menu']['parent']);
+ list($node->menu['menu_name'], $node->menu['plid']) = explode(':', $form_state['values']['menu']['parent']);
}
}