function node_gallery_config_form_validate in Node Gallery 6.2
Same name and namespace in other branches
- 6 node_gallery.admin.inc \node_gallery_config_form_validate()
File
- ./
node_gallery.admin.inc, line 316 - Node gallery admin page file
Code
function node_gallery_config_form_validate($form, &$form_state) {
if ($form_state['values']['step'] == 1) {
if ($form_state['values']['config']['gallery_type'] == $form_state['values']['config']['image_type']) {
unset($form_state['values']['step']);
form_set_error('Type', t('The gallery type and image type can\'t be the same.'));
}
/*$gallery_types = node_gallery_get_types();
if (in_array($form_state['values']['config']['gallery_type'], (array)$gallery_types)) {
unset($form_state['values']['step']);
form_set_error('Type', t('The gallery type selected is already being used, please choose a different one.'));
}*/
}
if ($form_state['values']['step'] == 2) {
node_gallery_upload_limits_form_validate($form, $form_state['values']['data']['upload_limits']);
}
}