You are here

dynamic_background.install in Dynamic Background 6

Same filename and directory in other branches
  1. 7.2 dynamic_background.install
  2. 7 dynamic_background.install

Handles the install and uninstall process for the module setting module weight and removes variables used by dynamic background.

File

dynamic_background.install
View source
<?php

/**
 * @file
 * Handles the install and uninstall process for the module setting module
 * weight and removes variables used by dynamic background.
 */

/**
 * Implementation of hook_install().
 */
function dynamic_background_install() {

  // Make this module's weight heavy, so it runs less and other modules.
  db_query("UPDATE {system} SET weight = 200 WHERE type = 'module' AND name = 'dynamic_background'");
}

/**
 * Implementation of hook_uninstall().
 */
function dynamic_background_uninstall() {
  variable_del('dynamic_background_setting');
  variable_del('dynamic_background_images');
  variable_del('dynamic_background_active');
  variable_del('dynamic_background_imagecache');
}

/**
 * Update module weight to handle modules as less.
 */
function dynamic_background_update_6001() {
  $ret = array();
  $ret[] = update_sql("UPDATE {system} SET weight = 200 WHERE type = 'module' AND name = 'dynamic_background'");
  return $ret;
}

Functions

Namesort descending Description
dynamic_background_install Implementation of hook_install().
dynamic_background_uninstall Implementation of hook_uninstall().
dynamic_background_update_6001 Update module weight to handle modules as less.