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

Removing custom variable export function (committed to CTools and included in...

Removing custom variable export function (committed to CTools and included in 1.3) and changing CTools export API owner to 'strongarm'.
parent 7f19c2a3
...@@ -130,32 +130,15 @@ function strongarm_schema_alter(&$schema) { ...@@ -130,32 +130,15 @@ function strongarm_schema_alter(&$schema) {
'identifier' => 'strongarm', 'identifier' => 'strongarm',
'default hook' => 'strongarm', 'default hook' => 'strongarm',
'api' => array( 'api' => array(
'owner' => 'system', 'owner' => 'strongarm',
'api' => 'strongarm', 'api' => 'strongarm',
'minimum_version' => 1, 'minimum_version' => 1,
'current_version' => 1, 'current_version' => 1,
), ),
// We declare this explicitly -- otherwise, CTools will use
// 'system_export_variable' as the default export callback.
'export callback' => 'strongarm_export_variable',
); );
$schema['variable']['fields']['value']['serialize'] = TRUE; $schema['variable']['fields']['value']['serialize'] = TRUE;
} }
/**
* CTools export function.
*
* Workaround for var_export() #fail with stdClass objects. See:
* http://bugs.php.net/bug.php?id=48016&edit=1. A proper patch is in the
* CTools issue queue here: http://drupal.org/node/661332. Once this is
* committed & included in a CTools release, this workaround will no
* longer be necessary.
*/
function strongarm_export_variable($variable, $indent = '') {
$export = ctools_export_object('variable', $variable, $indent);
return str_replace('stdClass::__set_state(', '(object) (', $export);
}
/** /**
* Implementation of hook_features_revert(). * Implementation of hook_features_revert().
*/ */
......
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