You are here

function rate_update_6000 in Rate 6.2

Same name and namespace in other branches
  1. 7 rate.install \rate_update_6000()

Implements hook_update_N().

File

./rate.install, line 48

Code

function rate_update_6000() {
  $widgets = variable_get('rate_widgets', array());
  foreach ($widgets as $widget_id => $widget) {
    $template = isset($widget->template) ? $widget->template : NULL;

    // "helpful" template was renamed to "yesno".
    if ($template == 'helpful') {
      $widget->template = 'yesno';
    }
    $widgets[$widget_id] = $widget;
  }
  variable_set('rate_widgets', $widgets);
  return array();
}