You are here

imagecache_customactions.install in ImageCache Actions 8

File

customactions/imagecache_customactions.install
View source
<?php

/**
 * Rename 'text' to 'php' in custom action effect data.
 */
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();
    }
  }
}

Functions

Namesort descending Description
imagecache_customactions_update_7100 Rename 'text' to 'php' in custom action effect data.