environment_force.module in Environment 6
Same filename and directory in other branches
The Environment Force module resets the site environment to the one set in settings.php.
File
modules/environment_force/environment_force.moduleView source
<?php
/**
* @file
* The Environment Force module resets the site environment to the one set in settings.php.
*/
/**
* Implementation of hook_init().
*/
function environment_force_init() {
$env_override = variable_get('environment_override', NULL);
if ($env_override) {
$current_env = environment_current();
if ($current_env != $env_override) {
environment_switch($env_override);
}
}
}
Functions
Name | Description |
---|---|
environment_force_init | Implementation of hook_init(). |