You are here

function boost_enable in Boost 6

Same name and namespace in other branches
  1. 7 boost.install \boost_enable()

Implementation of hook_enable().

File

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

Code

function boost_enable() {
  drupal_set_message(t('Boost successfully installed. Fix all errors and warnings on the <a href="@report">status report page</a> under Boost for a quick installation.', array(
    '@report' => url('admin/reports/status'),
  )));
  drupal_set_message(t('For a more in depth install, please review the available <a href="@settings">configuration settings</a>. There are 2 new <a href="@blocks">blocks</a> that you can add to help with the administrative side (<a href="@status">status</a>, <a href="@config">page configuration</a>), and 1 to support core <a href="@stats">stats</a>.', array(
    '@settings' => url('admin/settings/performance/boost'),
    '@blocks' => url('admin/build/block'),
    '@status' => url('admin/build/block/configure/boost/status'),
    '@config' => url('admin/build/block/configure/boost/config'),
    '@stats' => url('admin/build/block/configure/boost/stats'),
  )));

  // Forcibly disable Drupal's built-in SQL caching to prevent any conflicts of interest:
  if (variable_get('cache', CACHE_DISABLED) != CACHE_DISABLED) {
    variable_set('cache', CACHE_DISABLED);
    drupal_set_message(t('Drupal\'s <a href="@config">standard page caching</a> disabled by Boost.', array(
      '@config' => url('admin/settings/performance'),
    )), 'warning');
  }
}