You are here

function cdn_touch_file_form_submit in CDN 6.2

Same name and namespace in other branches
  1. 7.2 cdn.stats.inc \cdn_touch_file_form_submit()

File

./cdn.stats.inc, line 47
Per-page CDN integration statistics functionality.

Code

function cdn_touch_file_form_submit($form, &$form_state) {
  $filepath = $form_state['values']['filepath'];
  if (touch($filepath)) {
    drupal_set_message(t('Successfully touched %filepath.', array(
      '%filepath' => $filepath,
    )));
  }
  else {
    drupal_set_message(t('Failed to touch %filepath. Likely you do not have sufficient permissions.', array(
      '%filepath' => $filepath,
    )));
  }
  drupal_goto($form_state['storage']['redirect']);
}