diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-07-01 08:11:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-07-01 08:11:27 +0000 |
commit | 8eb8dcc8425295d1a4278613031812bff7d98c15 (patch) | |
tree | 665ff11ef19c4d8f9ea643effb7df5dab552db41 /modules/comment/comment.module | |
parent | 9ce7b3dcdc2cc964f422594b1cc65440cd7decef (diff) | |
download | brdo-8eb8dcc8425295d1a4278613031812bff7d98c15.tar.gz brdo-8eb8dcc8425295d1a4278613031812bff7d98c15.tar.bz2 |
- Patch #314358 by wonder95, Crell, killes, et al: add option to ignore slave servers. Finally.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 7b6180f20..bc578e350 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -962,12 +962,19 @@ function comment_save(&$comment) { 'homepage' => $comment['homepage'], )) ->execute(); + + // Ignore slave server temporarily to give time for the + // saved node to be propagated to the slave. + db_ignore_slave(); + // Tell the other modules a new comment has been submitted. comment_invoke_comment($comment, 'insert'); + // Add an entry to the watchdog log. watchdog('content', 'Comment: added %subject.', array('%subject' => $comment['subject']), WATCHDOG_NOTICE, l(t('view'), 'comment/' . $comment['cid'], array('fragment' => 'comment-' . $comment['cid']))); } _comment_update_node_statistics($comment['nid']); + // Clear the cache so an anonymous user can see his comment being added. cache_clear_all(); |