dynamic_background_panels.install in Dynamic Background 6
Same filename and directory in other branches
Handles install and uninstall of the module.
File
modules/dynamic_background_panels/dynamic_background_panels.installView source
<?php
/**
* @file
* Handles install and uninstall of the module.
*/
/**
* Implementation of hook_install().
*/
function dynamic_background_panels_install() {
// Make this module's weight heavy, so it overrides dynamic background main module.
db_query("UPDATE {system} SET weight = 220 WHERE type = 'module' AND name = 'dynamic_background_panels'");
}
/**
* Implementation of hook_uninstall():
*/
function dynamic_background_panels_uninstall() {
// Remove settings.
variable_del('dynamic_background_panels');
variable_del('dynamic_background_panels_imagecache');
}
/**
* Update module weight to handle modules as less.
*/
function dynamic_background_panels_update_6001() {
$ret = array();
$ret[] = update_sql("UPDATE {system} SET weight = 220 WHERE type = 'module' AND name = 'dynamic_background_panels'");
return $ret;
}
/**
* Update the panels configuration variable name to match naming of the other
* sub-modules.
*/
function dynamic_background_panels_update_6002() {
$conf = variable_get('dynamic_background_panels', FALSE);
if ($conf) {
variable_set('dynamic_background_panels_css', $conf);
variable_del('dynamic_background_panels');
}
}
Functions
Name | Description |
---|---|
dynamic_background_panels_install | Implementation of hook_install(). |
dynamic_background_panels_uninstall | Implementation of hook_uninstall(): |
dynamic_background_panels_update_6001 | Update module weight to handle modules as less. |
dynamic_background_panels_update_6002 | Update the panels configuration variable name to match naming of the other sub-modules. |