function imceimage_verify in Imce CCK Image 6
Same name and namespace in other branches
- 6.2 imceimage.module \imceimage_verify()
Verify that the file is a valid image
1 string reference to 'imceimage_verify'
- imceimage_menu in ./
imceimage.module - Implementation of hook_menu
File
- ./
imceimage.module, line 20
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);
}