You are here

function update_status_update_5201 in Update Status 5.2

Database changes required for 5.x-2.0-rc2:

  • Rename and prune dead variables.
  • Clear menu cache.

File

./update_status.install, line 67

Code

function update_status_update_5201() {
  $ret = array();
  $error_threshold = variable_get('update_status_error_threshold', '');
  if (!empty($error_threshold)) {
    variable_set('update_status_notification_threshold', $error_threshold);
    $ret[] = array(
      'success' => TRUE,
      'query' => "variable_set('update_status_notification_threshold', {$error_threshold})",
    );
  }
  foreach (array(
    'update_status_error_threshold',
    'update_status_usage_stats',
  ) as $variable) {
    variable_del($variable);
    $ret[] = array(
      'success' => TRUE,
      'query' => "variable_del({$variable})",
    );
  }

  // Reset the menu cache since admin/logs/updates/check is a new path.
  cache_clear_all();
  return $ret;
}