You are here

function fivestar_update_6105 in Fivestar 6

Same name and namespace in other branches
  1. 6.2 fivestar.install \fivestar_update_6105()

Belated update for Drupal 6: Re-enable Fivestar CCK fields.

File

./fivestar.install, line 197
Installation file for fivestar module.

Code

function fivestar_update_6105() {
  $ret = array();
  if (!module_exists('content')) {
    $ret[] = array(
      'success' => TRUE,
      'query' => t('CCK is not installed. No update ran.'),
    );
    return $ret;
  }
  if ($abort = content_check_update('fivestar')) {
    return $abort;
  }

  // All CCK fields are disabled by Content module during the D6 upgrade.
  // Re-enable the Fivestar fields.
  module_load_include('inc', 'fivestar', 'fivestar_field');
  content_associate_fields('fivestar');
  $ret[] = array(
    'success' => TRUE,
    'query' => t('Re-enabled Fivestar CCK fields.'),
  );
  return $ret;
}