You are here

function imagecache_external_flush_form_submit in Imagecache External 6

Same name and namespace in other branches
  1. 6.2 imagecache_external.admin.inc \imagecache_external_flush_form_submit()
  2. 7.2 imagecache_external.admin.inc \imagecache_external_flush_form_submit()
  3. 7 imagecache_external.admin.inc \imagecache_external_flush_form_submit()

Submit handler

File

./imagecache_external.admin.inc, line 51

Code

function imagecache_external_flush_form_submit($form, &$form_state) {
  $dir = realpath(file_directory_path() . '/externals');
  if (is_dir($dir)) {
    _imagecache_recursive_delete($dir);
    drupal_set_message(t('Flushed external images'));
    $form_state['redirect'] = 'admin/settings/imagecache_external';
  }
}