You are here

function imagecache_actions_validate_file in ImageCache Actions 8

Same name and namespace in other branches
  1. 7 utility.inc \imagecache_actions_validate_file()

Validates that the file as specified in the element exists and is readable.

This is a Form API #element_validate callback.

Parameters

array $element: param array $form_status

3 string references to 'imagecache_actions_validate_file'
canvasactions_canvas2file_form in canvasactions/canvasactions.inc
Image effect form callback for the underlay (background) effect.
canvasactions_file2canvas_form in canvasactions/canvasactions.inc
Image effect form callback for the overlay (watermark) effect.
canvasactions_imagemask_form in canvasactions/canvasactions.inc
Image effect form callback for the image mask effect.

File

./utility.inc, line 60
utility.inc: uitility form, conversion and rendering functions for image processing.

Code

function imagecache_actions_validate_file(&$element) {
  if (!imagecache_actions_find_file($element['#value'])) {
    form_error($element, t("Unable to find the file '%file'. Please check the path.", array(
      '%file' => $element['#value'],
    )));
  }
}