You are here

function imagefield_crop_file_settings_save in Imagefield Crop 7

Save imagefield_crop settings for a file.

1 call to imagefield_crop_file_settings_save()
imagefield_crop_widget_value in ./imagefield_crop.module
value callback

File

./imagefield_crop.module, line 59
Provide a widget to crop uploaded image.

Code

function imagefield_crop_file_settings_save($crop_settings) {
  $fid = $crop_settings['fid'];
  $settings =& drupal_static('imagefield_crop_file_settings', array());
  $settings[$fid] = $crop_settings;
  unset($crop_settings['fid']);
  return db_merge('imagefield_crop')
    ->key(array(
    'fid' => $fid,
  ))
    ->fields($crop_settings)
    ->execute();
}