function imagefield_extended_update_6400 in ImageField Extended 6.4
Implementation of hook_update_64XX().
File
- ./
imagefield_extended.install, line 26 - Standard installation hooks.
Code
function imagefield_extended_update_6400() {
$ret = array();
$q = db_query("SELECT field_name, type_name, label FROM {content_node_field_instance} WHERE widget_type = 'imagefield_extended_widget'");
while ($r = db_fetch_array($q)) {
db_query("UPDATE {content_node_field_instance} SET widget_type = 'imagefield_widget', widget_module = 'imagefield' WHERE field_name = '%s' AND type_name = '%s'", $r['field_name'], $r['type_name']);
$ret[] = array(
'success' => TRUE,
'query' => strtr('Updated the field instance %label (%type) back to imagefield.', array(
'%label' => check_plain($r['label']),
'%type' => $r['type_name'],
)),
);
}
cache_clear_all();
return $ret;
}