function hosting_subdirs_site_form_validate in Hosting 7.3
Same name and namespace in other branches
- 7.4 subdirs/hosting_subdirs.module \hosting_subdirs_site_form_validate()
Validation handler for site form.
Allow aliases with subdirectories.
1 string reference to 'hosting_subdirs_site_form_validate'
- hosting_subdirs_alter_alias_validation in subdirs/
hosting_subdirs.module - Replace the normal alias validation with one that will accept subdirs.
File
- subdirs/
hosting_subdirs.module, line 128 - Allow sites to be installed in subdirectories.
Code
function hosting_subdirs_site_form_validate($form, &$form_state) {
if (isset($form_state['values']['aliases'])) {
$aliases = $form_state['values']['aliases'] = array_filter($form_state['values']['aliases']);
foreach ($aliases as $key => $alias) {
hosting_subdirs_validate_alias($form_state['node'], $alias, $key);
}
}
}