You are here

function swftools_update_6016 in SWF Tools 6.3

Accommodates renaming of embedding methods.

File

./swftools.install, line 766
Install, update and uninstall functions for the SWF Tools module.

Code

function swftools_update_6016() {

  // Initialise a results array
  $ret = array();

  // Migrate handler defaults
  $method = variable_get('swftools_embed_method', FALSE);
  if ($method) {
    $map = array(
      'swftools_nojavascript' => 'swftools_direct',
      'swfobject2_replace' => 'swftools_swfobject2',
    );
    variable_set('swftools_embed_method', $map[$method]);
    $ret = array(
      array(
        'success' => TRUE,
        'query' => 'Embedding method migrated to new name.',
      ),
    );
  }

  // Return results
  return $ret;
}