/[drupal]/contributions/modules/boost/boost.install
ViewVC logotype

Contents of /contributions/modules/boost/boost.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Mon Nov 27 16:43:12 2006 UTC (3 years ago) by arto
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-4-7
Changes since 1.1: +3 -1 lines
File MIME type: text/x-php
Added code for module weight update to the install hook to ensure Boost is loaded early on in the Drupal bootstrap.
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 //////////////////////////////////////////////////////////////////////////////

  ViewVC Help
Powered by ViewVC 1.1.2