You are here

function boost_update_6121 in Boost 6

Update 6121 - Add indexes to database for boost_has_site_changed() function.

File

./boost.install, line 1395
Handles Boost module installation and upgrade tasks.

Code

function boost_update_6121() {
  $GLOBALS['_boost_max_execution_time'] = ini_get('max_execution_time');
  ini_set('max_execution_time', 10800);

  //3 Hours
  _boost_install_set_time_limit(0);

  // Make sure we have boost.module file loaded
  drupal_load('module', 'boost');
  $ret = array();
  _boost_index_exists($ret, 'node_revisions', 'timestamp');
  _boost_index_exists($ret, 'files', 'timestamp');
  _boost_index_exists($ret, 'comments', 'timestamp');
  _boost_index_exists($ret, 'node', 'changed');
  _boost_index_exists($ret, 'node_comment_statistics', 'last_comment_timestamp');
  _boost_index_exists($ret, 'votingapi_vote', 'timestamp');
  _boost_install_set_time_limit(0);
  ini_set('max_execution_time', $GLOBALS['_boost_max_execution_time']);
  return $ret;
}