Active
Project:
Boost
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 May 2011 at 04:17 UTC
Updated:
28 May 2011 at 04:17 UTC
Code Fix's - boost.module (2)
Fix #1
/**
* Get URLs from url alias table
*/
function boost_crawler_add_alias_to_table() {
// Insert batch of html URL's into boost_crawler table
- global $base_url, $language;
+ global $base_url, $language, $db_type;
if (!variable_get('boost_crawl_url_alias', FALSE)) {
return TRUE;
}
$count = BOOST_CRAWL_DB_IMPORT_SIZE;
// Get maximum packet size for mysql
if (stristr($db_type, 'pgsql')) {
// Set Max Packet size to 16MB if using postgreSQL.
$max_packet = 16777216;
}
Fix #2
/**
* Remove any urls in the crawler table if they are not expired or flushed.
*
* @param $expire
* Has the site changed, if so get expire column
*/
function boost_crawler_prune_table($expire) {
+ global $db_type;
if (variable_get('boost_crawl_prune_table', FALSE)) {
return TRUE;
}
// 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