Commit f15bb011 authored by webchick's avatar webchick

#457744 by quicksketch: Insert missing calls to file_attach_delete() and...

#457744 by quicksketch: Insert missing calls to file_attach_delete() and file_attach_delete_revision().
parent 1a4a3ec5
......@@ -1067,6 +1067,7 @@ function node_delete_multiple($nids) {
// Call the node-specific callback (if any):
node_invoke($node, 'delete');
module_invoke_all('node_delete', $node);
field_attach_delete('node', $node);
// Remove this node from the search index if needed.
// This code is implemented in node module rather than in search module,
......
......@@ -551,6 +551,7 @@ function node_revision_delete_confirm_submit($form, &$form_state) {
->condition('vid', $node_revision->vid)
->execute();
module_invoke_all('node_delete_revision', $node_revision);
field_attach_delete_revision('node', $node_revision);
watchdog('content', '@type: deleted %title revision %revision.', array('@type' => $node_revision->type, '%title' => $node_revision->title, '%revision' => $node_revision->vid));
drupal_set_message(t('Revision from %revision-date of @type %title has been deleted.', array('%revision-date' => format_date($node_revision->revision_timestamp), '@type' => node_type_get_name($node_revision), '%title' => $node_revision->title)));
$form_state['redirect'] = 'node/' . $node_revision->nid;
......
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