You are here

function boost_update_6109 in Boost 6

Update 6109 - Change .js to .json

File

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

Code

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

  //3 Hours
  _boost_install_set_time_limit(0);

  // _boost_change_extension() is located in the module file, make sure thats loaded.
  drupal_load('module', 'boost');
  variable_set('boost_json_extension', '.json');
  _boost_change_extension('.js', '.json');
  drupal_set_message(t('Be sure to update your htaccess rules.'), BOOST_CACHE_JSON ? 'warning' : 'status');
  _boost_install_set_time_limit(0);
  ini_set('max_execution_time', $GLOBALS['_boost_max_execution_time']);
  return array(
    array(
      'success' => TRUE,
      'query' => '.js extension changed to .json.',
    ),
  );
}