function boost_update_6114 in Boost 6
Update 6114 - Calculate url MD5 for boost_crawler table
File
- ./
boost.install, line 1159 - Handles Boost module installation and upgrade tasks.
Code
function boost_update_6114() {
$GLOBALS['_boost_max_execution_time'] = ini_get('max_execution_time');
ini_set('max_execution_time', 10800);
//3 Hours
_boost_install_set_time_limit(0);
$result = db_query("SELECT url FROM {boost_crawler} WHERE hash = ''");
while ($url = db_result($result)) {
$hash = md5($url);
db_query("UPDATE {boost_crawler} SET hash = '%s' WHERE url = '%s'", $hash, $url);
}
_boost_install_set_time_limit(0);
ini_set('max_execution_time', $GLOBALS['_boost_max_execution_time']);
return array(
array(
'success' => TRUE,
'query' => 'URLs hashed',
),
);
}