function imagecache_customactions_update_7100 in ImageCache Actions 7
Same name and namespace in other branches
- 8 customactions/imagecache_customactions.install \imagecache_customactions_update_7100()
Rename 'text' to 'php' in custom action effect data.
File
- customactions/
imagecache_customactions.install, line 5
Code
function imagecache_customactions_update_7100() {
$effects = db_select('image_effects')
->fields('image_effects')
->condition('name', 'imagecache_customactions', '=')
->execute()
->fetchAll();
foreach ($effects as $effect) {
$data = unserialize($effect->data);
if (array_key_exists('text', $data)) {
$data['php'] = $data['text'];
unset($data['text']);
$data = serialize($data);
db_update('image_effects')
->condition('ieid', $effect->ieid)
->fields(array(
'data' => $data,
))
->execute();
}
}
}