function boost_update_6112 in Boost 6
Update 6112 - Calculate filename MD5 for boost_cache table
File
- ./
boost.install, line 1125 - Handles Boost module installation and upgrade tasks.
Code
function boost_update_6112() {
$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 filename FROM {boost_cache} WHERE hash = ''");
while ($filename = db_result($result)) {
$hash = md5($filename);
db_query("UPDATE {boost_cache} SET hash = '%s' WHERE filename = '%s'", $hash, $filename);
}
_boost_install_set_time_limit(0);
ini_set('max_execution_time', $GLOBALS['_boost_max_execution_time']);
return array(
array(
'success' => TRUE,
'query' => 'Filenames hashed',
),
);
}