Commit 9f7b16ad authored by Steven Wittens's avatar Steven Wittens
Browse files

#12793: Remove dependency of node.module on search.module.

parent e7b0b227
......@@ -1435,8 +1435,10 @@ function node_delete($edit) {
// Clear the cache so an anonymous poster can see the node being deleted.
cache_clear_all();
// Remove this node from the search index
search_wipe($node->nid, 'node');
// Remove this node from the search index if needed.
if (function_exists('search_wipe')) {
search_wipe($node->nid, 'node');
}
watchdog('special', t('%type: deleted %title.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")));
$output = t('The node has been deleted.');
......
......@@ -1435,8 +1435,10 @@ function node_delete($edit) {
// Clear the cache so an anonymous poster can see the node being deleted.
cache_clear_all();
// Remove this node from the search index
search_wipe($node->nid, 'node');
// Remove this node from the search index if needed.
if (function_exists('search_wipe')) {
search_wipe($node->nid, 'node');
}
watchdog('special', t('%type: deleted %title.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")));
$output = t('The node has been deleted.');
......
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