You are here

function imagefield_crop_update_6000 in Imagefield Crop 6

Upgrade to Drupal 6.

File

./imagefield_crop.install, line 6

Code

function imagefield_crop_update_6000() {

  // Make sure CCK's been updated first.
  if ($abort = content_check_update('imagefield_crop')) {
    return $abort;
  }
  module_load_include('inc', 'content', 'includes/content.admin');
  module_load_include('inc', 'content', 'includes/content.crud');
  $ret[] = update_sql("UPDATE {" . content_instance_tablename() . "} SET widget_type = 'imagefield_crop_widget' WHERE widget_type = 'image crop'");
  content_associate_fields('imagefield_crop');
  content_clear_type_cache(TRUE);
  return $ret;
}