? .strongarm.module.swp Index: strongarm.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/strongarm/strongarm.module,v retrieving revision 1.1.2.6 diff -u -r1.1.2.6 strongarm.module --- strongarm.module 24 Sep 2009 16:17:23 -0000 1.1.2.6 +++ strongarm.module 14 Nov 2009 22:01:06 -0000 @@ -44,6 +44,17 @@ $var_conf = $cache ? $cache->data : NULL; } if (!isset($var_conf) && $bootstrapped) { + // Load defautls implemented via ctools. + if (module_exists('ctools')) { + ctools_include('export'); + $vars = ctools_export_load_object('variable'); + foreach($vars as $var) { + if ($var->export_type & EXPORT_IN_CODE) { + $var_conf[$var->name] = $var->value; + } + } + } + // Load defautls implemented via hook_strongarm(). // We don't use module_invoke_all() here since // array_merge_recursive() can alter the desired structure of // some variables. @@ -168,3 +179,15 @@ cache_clear_all('variables', 'cache'); cache_clear_all('strongarm', 'cache'); } + +/** + * Implementation of hook_schema_alter(). Makes the variables table usable by + * ctools' export.inc. + */ +function strongarm_schema_alter(&$schema) { + $schema['variable']['export'] = array( + 'key' => 'name', + ); + $schema['variable']['fields']['value']['serialize'] = true; +} +