You are here

function shrinktheweb_admin_settings_submit in ShrinkTheWeb 7

Same name and namespace in other branches
  1. 6 shrinktheweb.admin.inc \shrinktheweb_admin_settings_submit()
1 string reference to 'shrinktheweb_admin_settings_submit'
shrinktheweb_admin_settings in ./shrinktheweb.admin.inc

File

./shrinktheweb.admin.inc, line 388

Code

function shrinktheweb_admin_settings_submit($form, &$form_state) {
  module_load_include('inc', 'shrinktheweb', 'shrinktheweb.api');
  $clear_imagecache = $form_state['values']['shrinktheweb_clear_imagecache'];
  if (!empty($clear_imagecache)) {
    if ($clear_imagecache == TRUE) {
      shrinktheweb_deleteAllImages();
      drupal_set_message('All cached thumbshots got deleted');
    }
  }
  $clear_errorcache = $form_state['values']['shrinktheweb_clear_errorcache'];
  if (!empty($clear_errorcache)) {
    if ($clear_errorcache == TRUE) {
      shrinktheweb_deleteErrorImages();
      drupal_set_message('All cached error images got deleted');
    }
  }
}