| 1 |
<?php
|
| 2 |
// $Id: boost.install,v 1.1 2006/11/21 03:39:19 arto Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Handles Boost module installation and upgrade tasks.
|
| 7 |
*/
|
| 8 |
|
| 9 |
//////////////////////////////////////////////////////////////////////////////
|
| 10 |
|
| 11 |
/**
|
| 12 |
* Implementation of hook_install(). Installs the current version of the database schema.
|
| 13 |
*/
|
| 14 |
function boost_install() {
|
| 15 |
// Ensure that the module is loaded early in the bootstrap:
|
| 16 |
db_query("UPDATE {system} SET weight = -90 WHERE name = 'boost'");
|
| 17 |
|
| 18 |
// Forcibly disable Drupal's built-in SQL caching to prevent any conflicts of interest:
|
| 19 |
if (variable_get('cache', CACHE_DISABLED) != CACHE_DISABLED) {
|
| 20 |
variable_set('cache', CACHE_DISABLED);
|
| 21 |
drupal_set_message(t('Drupal standard page caching disabled by Boost.'));
|
| 22 |
}
|
| 23 |
|
| 24 |
drupal_set_message(t('Boost module successfully installed.'));
|
| 25 |
}
|
| 26 |
|
| 27 |
//////////////////////////////////////////////////////////////////////////////
|