diff modules/book/book.pages.inc @ 9:acef7ccb09b5 6.4

Drupal 6.4
author Franck Deroche <webmaster@defr.org>
date Tue, 23 Dec 2008 14:32:08 +0100
parents c1f4ac30525a
children
line wrap: on
line diff
--- a/modules/book/book.pages.inc	Tue Dec 23 14:30:28 2008 +0100
+++ b/modules/book/book.pages.inc	Tue Dec 23 14:32:08 2008 +0100
@@ -1,5 +1,5 @@
 <?php
-// $Id: book.pages.inc,v 1.5 2007/12/22 23:24:24 goba Exp $
+// $Id: book.pages.inc,v 1.5.2.1 2008/08/13 23:59:13 drumm Exp $
 
 /**
  * @file
@@ -231,11 +231,8 @@
  *   Prints the replacement HTML in JSON format.
  */
 function book_form_update() {
-  $cid = 'form_'. $_POST['form_build_id'];
   $bid = $_POST['book']['bid'];
-  $cache = cache_get($cid, 'cache_form');
-  if ($cache) {
-    $form = $cache->data;
+  if ($form = form_get_cache($_POST['form_build_id'], $form_state)) {
 
     // Validate the bid.
     if (isset($form['book']['bid']['#options'][$bid])) {
@@ -243,7 +240,7 @@
       $book_link['bid'] = $bid;
       // Get the new options and update the cache.
       $form['book']['plid'] = _book_parent_select($book_link);
-      cache_set($cid, $form, 'cache_form', $cache->expire);
+      form_set_cache($_POST['form_build_id'], $form, $form_state);
 
       // Build and render the new select element, then return it in JSON format.
       $form_state = array();