diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2011-07-04 10:16:28 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2011-07-04 10:16:28 -0700 |
commit | b0af4490479b4090c51a9201017b31a4929fe9c5 (patch) | |
tree | 8126abac4f1ed6f43a222deef0eaa8220d57a5c6 | |
parent | 1046f0f2de5c663cf2c573ab086d957255367357 (diff) | |
download | brdo-b0af4490479b4090c51a9201017b31a4929fe9c5.tar.gz brdo-b0af4490479b4090c51a9201017b31a4929fe9c5.tar.bz2 |
Issue #360377 by deviantintegral, janusman: Fixed book_get_books() cache becomes stale when batch-inserting book pages.
-rw-r--r-- | modules/book/book.module | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/book/book.module b/modules/book/book.module index de9561fec..beb17214c 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -617,6 +617,8 @@ function _book_update_outline($node) { 'bid' => $node->book['bid'], )) ->execute(); + // Reset the cache of stored books. + drupal_static_reset('book_get_books'); } else { if ($node->book['bid'] != db_query("SELECT bid FROM {book} WHERE nid = :nid", array( @@ -624,6 +626,8 @@ function _book_update_outline($node) { ))->fetchField()) { // Update the bid for this page and all children. book_update_bid($node->book); + // Reset the cache of stored books. + drupal_static_reset('book_get_books'); } } @@ -895,6 +899,7 @@ function book_node_delete($node) { db_delete('book') ->condition('mlid', $node->book['mlid']) ->execute(); + drupal_static_reset('book_get_books'); } } |