You are here

function imagecache_preset_actions in ImageCache 5.2

Same name and namespace in other branches
  1. 6.2 imagecache.module \imagecache_preset_actions()
1 call to imagecache_preset_actions()
imagecache_presets in ./imagecache.module
Get an array of all presets and their settings.

File

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

Code

function imagecache_preset_actions($preset, $reset = false) {
  static $actions_cache = array();
  if ($reset || empty($actions_cache[$preset['presetid']])) {
    $result = db_query('SELECT * FROM {imagecache_action} where presetid = %d order by weight', $preset['presetid']);
    while ($row = db_fetch_array($result)) {
      $row['data'] = unserialize($row['data']);
      $actions_cache[$preset['presetid']][] = $row;
    }
  }
  return isset($actions_cache[$preset['presetid']]) ? $actions_cache[$preset['presetid']] : array();
}