You are here

function _radioactivity_upgrade_profile in Radioactivity 5

1 call to _radioactivity_upgrade_profile()
radioactivity_update_1 in ./radioactivity.install

File

./radioactivity.install, line 96

Code

function _radioactivity_upgrade_profile($profile) {
  $ret = array();
  if (isset($profile['label'])) {
    $ret['label'] = $profile['label'];
  }
  if (isset($profile['description'])) {
    $ret['description'] = $profile['description'];
  }
  if (isset($profile['half_life'])) {
    $ret['half_life'] = $profile['half_life'];
  }
  if (isset($profile['cut_off_energy'])) {
    $ret['cut_off_energy'] = $profile['cut_off_energy'];
  }
  $ret['energy']['node'] = array(
    'view' => $profile['energy_view'],
    'comment_insert' => $profile['energy_comment_insert'],
    'comment_publish' => $profile['energy_comment_publish'],
  );
  return $ret;
}