You are here

function spaces_update_6302 in Spaces 6.3

Update old spaces preset exportables. This update script may be re-run at any time to update spaces 2 preset objects that have been exported.

File

./spaces.install, line 346

Code

function spaces_update_6302() {
  $presets = array();

  // Invoke spaces 2 presets hook so that the spaces  presets can be migrated.
  foreach (module_invoke_all('spaces_presets') as $name => $preset) {
    $preset = (object) $preset;
    if (!isset($preset->api_version)) {
      $presets[$name] = $preset;
    }
  }

  // Migrate objects.
  spaces_migrate_api_3_presets($presets);
  return array();
}