function imagecache_action_save in ImageCache 5.2
Same name and namespace in other branches
- 6.2 imagecache.module \imagecache_action_save()
3 calls to imagecache_action_save()
File
- ./
imagecache.module, line 895 - Dynamic image resizer and image cacher.
Code
function imagecache_action_save($action) {
if ($action['actionid']) {
db_query('UPDATE {imagecache_action} SET weight=%d, data=\'%s\' WHERE actionid=%d', $action['weight'], serialize($action['data']), $action['actionid']);
}
else {
$action['actionid'] = db_next_id('{imagecache_action}_actionid');
db_query('INSERT INTO {imagecache_action} (actionid, presetid, weight, action, data) VALUES (%d, %d, %d,\'%s\', \'%s\')', $action['actionid'], $action['presetid'], $action['weight'], $action['action'], serialize($action['data']));
}
$preset = imagecache_preset($action['presetid']);
imagecache_preset_flush($preset);
imagecache_presets(true);
return $action;
}