? .directory ? boost-907898.patch Index: boost.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v retrieving revision 1.3.2.2.2.5.2.384 diff -u -p -r1.3.2.2.2.5.2.384 boost.module --- boost.module 8 Sep 2010 21:22:50 -0000 1.3.2.2.2.5.2.384 +++ boost.module 10 Sep 2010 18:45:43 -0000 @@ -5543,12 +5543,26 @@ function boost_crawler_prune_table($expi if (variable_get('boost_crawl_prune_table', FALSE)) { return TRUE; } - if ($expire && BOOST_LOOPBACK_BYPASS) { - db_query("DELETE cr FROM {boost_crawler} cr USING {boost_cache} AS ca WHERE cr.hash=ca.hash_url AND ca.expire BETWEEN 1 AND 434966399 OR ca.expire > %d", BOOST_TIME); + + // PostgreSQL + if (stristr($db_type, 'pgsql')) { + if ($expire && BOOST_LOOPBACK_BYPASS) { + db_query("DELETE cr FROM {boost_crawler} cr USING {boost_cache} AS ca WHERE cr.hash=ca.hash_url AND ca.expire BETWEEN 1 AND 434966399 OR ca.expire > %d", BOOST_TIME); + } + else { + db_query("DELETE cr FROM {boost_crawler} cr USING {boost_cache} AS ca WHERE cr.hash=ca.hash_url AND ca.expire BETWEEN 1 AND 434966399 OR ca.expire > 434966400"); + } } + // All others else { - db_query("DELETE cr FROM {boost_crawler} cr USING {boost_cache} AS ca WHERE cr.hash=ca.hash_url AND ca.expire BETWEEN 1 AND 434966399 OR ca.expire > 434966400"); + if ($expire && BOOST_LOOPBACK_BYPASS) { + db_query("DELETE cr FROM {boost_crawler} cr INNER JOIN {boost_cache} AS ca ON cr.hash=ca.hash_url WHERE ca.expire BETWEEN 1 AND 434966399 OR ca.expire > %d", BOOST_TIME); + } + else { + db_query("DELETE cr FROM {boost_crawler} cr INNER JOIN {boost_cache} AS ca ON cr.hash=ca.hash_url WHERE ca.expire BETWEEN 1 AND 434966399 OR ca.expire > 434966400"); + } } + variable_set('boost_crawl_prune_table', TRUE); return FALSE; }