summaryrefslogtreecommitdiff
path: root/modules/node
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-02-17 05:42:42 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-02-17 05:42:42 +0000
commitfd7a32443705f6b4adcf77a6d6480301f90d5858 (patch)
tree973ffefc89807e6d8248ca849eb0892b73b975a2 /modules/node
parent00319d8e9a8b35148a6856d3380d572c571b94dc (diff)
downloadbrdo-fd7a32443705f6b4adcf77a6d6480301f90d5858.tar.gz
brdo-fd7a32443705f6b4adcf77a6d6480301f90d5858.tar.bz2
#645374 follow-up by sun: Make entity ids available to confirm form submit handlers.
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/node.pages.inc8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc
index 0da6bdb17..b13ba4dd0 100644
--- a/modules/node/node.pages.inc
+++ b/modules/node/node.pages.inc
@@ -469,11 +469,9 @@ function node_form_submit_build_node($form, &$form_state) {
* Menu callback -- ask for confirmation of node deletion
*/
function node_delete_confirm($form, &$form_state, $node) {
- $form['nid'] = array(
- '#type' => 'value',
- '#value' => $node->nid,
- );
-
+ $form['#node'] = $node;
+ // Always provide entity id in the same form key as in the entity edit form.
+ $form['nid'] = array('#type' => 'value', '#value' => $node->nid);
return confirm_form($form,
t('Are you sure you want to delete %title?', array('%title' => $node->title)),
'node/' . $node->nid,