function _imagecache_preset_update in ImageCache 5
Update a preset.
Parameters
id: Preset id.
name: new name for the preset
1 call to _imagecache_preset_update()
File
- ./
imagecache.module, line 530 - Dynamic image resizer and image cacher.
Code
function _imagecache_preset_update($id, $name) {
$name = check_plain($name);
$id = (int) $id;
_imagecache_preset_flush($id);
db_query('UPDATE {imagecache_preset} SET presetname =\'%s\' WHERE presetid = %d', $name, $id);
drupal_set_message(t('Updated preset "%name" (ID: @id)', array(
'%name' => $name,
'@id' => $id,
)));
// Reset presets cache.
_imagecache_get_presets(TRUE);
$_REQUEST['destination'] = 'admin/settings/imagecache/preset/' . $id;
}