function imagecache_action_save in ImageCache 6.2
Same name and namespace in other branches
- 5.2 imagecache.module \imagecache_action_save()
2 calls to imagecache_action_save()
File
- ./
imagecache.module, line 1167 - Dynamic image resizer and image cacher.
Code
function imagecache_action_save($action) {
$definition = imagecache_action_definition($action['action']);
$action = array_merge($definition, $action);
// Some actions don't have data. Make an empty one to prevent SQL errors.
if (!isset($action['data'])) {
$action['data'] = array();
}
if (!empty($action['actionid'])) {
drupal_write_record('imagecache_action', $action, 'actionid');
}
else {
drupal_write_record('imagecache_action', $action);
}
$preset = imagecache_preset($action['presetid']);
imagecache_preset_flush($preset);
imagecache_presets(TRUE);
return $action;
}