You are here

function imceimage_verify in Imce CCK Image 6.2

Same name and namespace in other branches
  1. 6 imceimage.module \imceimage_verify()

Page callback for imceimage/verify. Verify that the file is a valid image.

1 string reference to 'imceimage_verify'
imceimage_menu in ./imceimage.module
Implements hook_menu()

File

./imceimage.module, line 23

Code

function imceimage_verify() {
  $args = func_get_args();

  //convert the url into filepath
  $url = join('/', $args);
  $file_path = _imceimage_image_to_filepath($url);
  if (($info = image_get_info($file_path)) == FALSE) {
    $info = array();
    $info['validimage'] = FALSE;
  }
  else {
    $info['validimage'] = TRUE;
  }
  drupal_json($info);
}