Commit fbaabb27 authored by young hahn's avatar young hahn
Browse files

#651914: Prevent strongarm from init'ing during install steps.

parent 76a9bafb
......@@ -21,15 +21,20 @@ function strongarm_set_conf($reset = FALSE) {
$var_conf = $cache->data;
}
else {
ctools_include('export');
$vars = ctools_export_load_object('variable');
foreach ($vars as $var) {
$var_conf[$var->name] = $var->value;
// Ensure that the schema cache is not stale when we init. This check, for
// example, prevents strongarm from initing when install profiles are run.
$schema = drupal_get_schema('variable');
if (isset($schema['export'])) {
$var_conf = array();
ctools_include('export');
foreach (ctools_export_load_object('variable') as $var) {
$var_conf[$var->name] = $var->value;
}
cache_set('strongarm', $var_conf);
}
cache_set('strongarm', $var_conf);
}
global $conf;
$conf = $var_conf;
$conf = isset($var_conf) ? $var_conf : $conf;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment