function imagecache_external_admin_form_validate in Imagecache External 7.2
Validate callback for the admin form.
File
- ./
imagecache_external.admin.inc, line 83 - Admin forms for this module.
Code
function imagecache_external_admin_form_validate($form, $form_state) {
$scheme = file_default_scheme();
$directory = $scheme . '://' . $form_state['values']['imagecache_directory'];
if (!file_prepare_directory($directory, FILE_CREATE_DIRECTORY)) {
form_set_error('imagecache_directory', t('The directory %directory does not exist or is not writable.', array(
'%directory' => $directory,
)));
watchdog('imagecache_external', 'The directory %directory does not exist or is not writable.', array(
'%directory' => $directory,
), WATCHDOG_ERROR);
}
}