You are here

function iss_save_iss_styles in Image Style Selector 7.2

Helper function.

2 calls to iss_save_iss_styles()
iss_file_insert in ./iss.module
iss_file_update in ./iss.module

File

./iss.module, line 285

Code

function iss_save_iss_styles($fid, $iss_styles) {
  db_delete('iss_styles')
    ->condition('fid', $fid, '=')
    ->execute();
  foreach ($iss_styles as $source => $target) {
    if ($source != $target) {
      $record = array(
        'fid' => $fid,
        'vid' => 0,
        'source_style' => $source,
        'target_style' => $target,
      );
      drupal_write_record('iss_styles', $record);
    }
  }
}