Commit 297bc73f authored by Dries's avatar Dries
Browse files

- Bugfix: deleting a node should flush the cache.
parent b2583b62
...@@ -311,8 +311,8 @@ function node_save($node) { ...@@ -311,8 +311,8 @@ function node_save($node) {
} }
/* /*
** Clear the cache so an anonymous poster can see the node being added ** Clear the cache so an anonymous poster can see the node being
** or updated. ** added or updated.
*/ */
cache_clear_all(); cache_clear_all();
...@@ -1351,6 +1351,13 @@ function node_delete($edit) { ...@@ -1351,6 +1351,13 @@ function node_delete($edit) {
node_invoke($node, "delete"); node_invoke($node, "delete");
node_invoke_all($node, "nodeapi", "delete"); node_invoke_all($node, "nodeapi", "delete");
/*
** Clear the cache so an anonymous poster can see the node being
** deleted.
*/
cache_clear_all();
watchdog("special", "$node->type: deleted '$node->title'"); watchdog("special", "$node->type: deleted '$node->title'");
$output = t("The node has been deleted."); $output = t("The node has been deleted.");
} }
......
...@@ -311,8 +311,8 @@ function node_save($node) { ...@@ -311,8 +311,8 @@ function node_save($node) {
} }
/* /*
** Clear the cache so an anonymous poster can see the node being added ** Clear the cache so an anonymous poster can see the node being
** or updated. ** added or updated.
*/ */
cache_clear_all(); cache_clear_all();
...@@ -1351,6 +1351,13 @@ function node_delete($edit) { ...@@ -1351,6 +1351,13 @@ function node_delete($edit) {
node_invoke($node, "delete"); node_invoke($node, "delete");
node_invoke_all($node, "nodeapi", "delete"); node_invoke_all($node, "nodeapi", "delete");
/*
** Clear the cache so an anonymous poster can see the node being
** deleted.
*/
cache_clear_all();
watchdog("special", "$node->type: deleted '$node->title'"); watchdog("special", "$node->type: deleted '$node->title'");
$output = t("The node has been deleted."); $output = t("The node has been deleted.");
} }
......
Supports Markdown
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