diff options
author | Jennifer Hodgdon <yahgrp@poplarware.com> | 2014-01-30 09:10:33 -0800 |
---|---|---|
committer | Jennifer Hodgdon <yahgrp@poplarware.com> | 2014-01-30 09:10:33 -0800 |
commit | 55759622acba7428d789ad94cdd4eb981ce0210f (patch) | |
tree | 5f24691009f911d638ae1f869e1232dfbffbaefd /modules/node | |
parent | 7f3e67040fc154072564217cce0cd8c5efcaefbc (diff) | |
download | brdo-55759622acba7428d789ad94cdd4eb981ce0210f.tar.gz brdo-55759622acba7428d789ad94cdd4eb981ce0210f.tar.bz2 |
Issue #2107231 by valderama: Fix documentation for hook_delete()
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.api.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/node/node.api.php b/modules/node/node.api.php index f8dcfdeff..0a21aa2df 100644 --- a/modules/node/node.api.php +++ b/modules/node/node.api.php @@ -1033,9 +1033,17 @@ function hook_node_type_delete($info) { * This hook is invoked only on the module that defines the node's content type * (use hook_node_delete() to respond to all node deletions). * - * This hook is invoked from node_delete_multiple() after the node has been - * removed from the node table in the database, before hook_node_delete() is - * invoked, and before field_attach_delete() is called. + * This hook is invoked from node_delete_multiple() before hook_node_delete() + * is invoked and before field_attach_delete() is called. + * + * Note that when this hook is invoked, the changes have not yet been written + * to the database, because a database transaction is still in progress. The + * transaction is not finalized until the delete operation is entirely + * completed and node_delete_multiple() goes out of scope. You should not rely + * on data in the database at this time as it is not updated yet. You should + * also note that any write/update database queries executed from this hook are + * also not committed immediately. Check node_delete_multiple() and + * db_transaction() for more info. * * @param $node * The node that is being deleted. |