You are here

function imagecache_action in ImageCache 5.2

Same name and namespace in other branches
  1. 6.2 imagecache.module \imagecache_action()
5 calls to imagecache_action()
imagecache_ui_action_delete_form in ./imagecache_ui.module
imagecache_ui_action_delete_form_submit in ./imagecache_ui.module
imagecache_ui_action_form in ./imagecache_ui.module
imagecache_ui_action_form_submit in ./imagecache_ui.module
imagecache_ui_menu in ./imagecache_ui.module
1 string reference to 'imagecache_action'
imagecache_update_3 in ./imagecache.install
Remove auto-increment from tables, instead depending on the sequences table and db_next_id()

File

./imagecache.module, line 876
Dynamic image resizer and image cacher.

Code

function imagecache_action($actionid) {
  static $actions;
  if (!isset($actions[$actionid])) {
    $action = array();
    $result = db_query('SELECT * FROM {imagecache_action} WHERE actionid=%d', $actionid);
    if ($row = db_fetch_array($result)) {
      $action = $row;
      $action['data'] = unserialize($action['data']);
      $definition = imagecache_action_definition($action['action']);
      $action = array_merge($definition, $action);
      $actions[$actionid] = $action;
    }
  }
  return $actions[$actionid];
}