? boost-609310.patch Index: boost.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v retrieving revision 1.3.2.2.2.5.2.195 diff -u -p -r1.3.2.2.2.5.2.195 boost.module --- boost.module 18 Oct 2009 23:43:56 -0000 1.3.2.2.2.5.2.195 +++ boost.module 20 Oct 2009 18:09:03 -0000 @@ -76,6 +76,7 @@ define('BOOST_PERMISSIONS_FILE', var define('BOOST_PERMISSIONS_DIR', variable_get('boost_permissions_dir', '')); define('BOOST_EXPIRE_NO_FLUSH', variable_get('boost_expire_no_flush', FALSE)); define('BOOST_VERBOSE', variable_get('boost_verbose', 5)); +define('BOOST_NO_DATABASE', TRUE); // Crawler Settings define('BOOST_CRAWL_ON_CRON', variable_get('boost_crawl_on_cron', FALSE)); @@ -143,7 +144,7 @@ function boost_help($path, $arg) { * reference to the view being worked on */ function boost_views_pre_render(&$view) { - if (!is_null($view) && $GLOBALS['_boost_cache_this']) { + if (!is_null($view) && $GLOBALS['_boost_cache_this'] && !BOOST_NO_DATABASE) { foreach ($view->result as $item) { $node = node_load($item->nid); $GLOBALS['_boost_relationships'][] = array('child_page_callback' => 'node', 'child_page_type' => $node->type, 'child_page_id' => $item->nid); @@ -388,7 +389,7 @@ function boost_flush_caches() { * Implementation of hook_comment(). Acts on comment modification. */ function boost_comment($comment, $op) { - if (!BOOST_ENABLED) return; + if (!BOOST_ENABLED || BOOST_NO_DATABASE) return; switch ($op) { case 'insert': @@ -414,7 +415,7 @@ function boost_comment($comment, $op) { * Implementation of hook_nodeapi(). Acts on nodes defined by other modules. */ function boost_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) { - if (!BOOST_ENABLED) return; + if (!BOOST_ENABLED || BOOST_NO_DATABASE) return; switch ($op) { case 'insert': @@ -461,7 +462,7 @@ function _boost_view_insert() { * array of votes */ function boost_votingapi_insert($votes) { - if (!BOOST_ENABLED) return; + if (!BOOST_ENABLED || BOOST_NO_DATABASE) return; foreach ($votes as $vote) { $node = node_load($vote['content_id']); @@ -476,7 +477,7 @@ function boost_votingapi_insert($votes) * array of votes */ function boost_votingapi_delete($votes) { - if (!BOOST_ENABLED) return; + if (!BOOST_ENABLED || BOOST_NO_DATABASE) return; foreach ($votes as $vote) { $node = node_load($vote['content_id']); @@ -570,7 +571,7 @@ function boost_taxonomy_node_get_tids($n * Implementation of hook_taxonomy(). Acts on taxonomy changes. */ function boost_taxonomy($op, $type, $term = NULL) { - if (!BOOST_ENABLED) return; + if (!BOOST_ENABLED || BOOST_NO_DATABASE) return; switch ($op) { case 'insert': @@ -707,7 +708,7 @@ function boost_block($op = 'list', $delt case 'config': // Don't show the block to anonymous users, nor on any pages that // aren't even cacheable to begin with (e.g. admin/*). - if (!empty($user->uid) && boost_is_cacheable($GLOBALS['_boost_path'])) { + if (!empty($user->uid) && boost_is_cacheable($GLOBALS['_boost_path']) && !BOOST_NO_DATABASE) { $block['subject'] = ''; $block['content'] = theme('boost_cache_status', -1, drupal_get_form('boost_block_db_settings_form')); } @@ -1630,8 +1631,10 @@ function boost_cache_set($path, $data, $ if (BOOST_GZIP) { boost_cache_write(str_replace(BOOST_FILE_PATH, BOOST_GZIP_FILE_PATH, $filename) . BOOST_GZIP_EXTENSION, gzencode($data, 9)); } - boost_db_prep($filename, $extension, BOOST_TIME + $expire); - boost_cache_set_node_relationships($GLOBALS['_boost_relationships']); + if (!BOOST_NO_DATABASE) { + boost_db_prep($filename, $extension, BOOST_TIME + $expire); + boost_cache_set_node_relationships($GLOBALS['_boost_relationships']); + } return TRUE; } else {