You are here

function strongarm_set_conf in Strongarm 6

Sets the global configuration. When in Weakarm mode, will log any values that have been overridden and leave their conf values alone.

3 calls to strongarm_set_conf()
strongarm_admin_revert_submit in ./strongarm.admin.inc
Revert form submit handler.
strongarm_boot in ./strongarm.module
Implementation of hook_boot(). This is a very aggressive way of ensuring that these variables are set. Necessary for variables that are checked by modules on hook_init().
strongarm_init in ./strongarm.module
Implementation of hook_init().

File

./strongarm.module, line 76

Code

function strongarm_set_conf($var_conf = array()) {
  if (!empty($var_conf)) {
    global $conf;
    foreach ($var_conf as $k => $v) {

      // The variable is overridden -- let it be, but log the override if we are in Weakarm mode.
      if (variable_get('strongarm_mode', STRONGARM_MODE_STRONG) == STRONGARM_MODE_WEAK && isset($conf[$k]) && $conf[$k] != $v) {
        strongarm_overridden_vars($k);
      }
      else {
        $conf[$k] = $v;
      }
    }
  }
}