You are here

function content_profile_update_6003 in Content Profile 6

Update the settings to reflect the changes of the format ('edit_link_sub' has been removed in favour of 'edit_tab')

File

./content_profile.install, line 109
Content profile installation file.

Code

function content_profile_update_6003() {
  $ret = array();
  drupal_load('module', 'content_profile');
  foreach (content_profile_get_types('names') as $type => $type_name) {
    $settings = content_profile_get_settings($type);
    if (!empty($settings['edit_link_sub'])) {
      unset($settings['edit_link_sub']);
      $settings['edit_tab'] = 'sub';
      content_profile_set_settings($type, $settings);
    }
  }
  return $ret;
}