You are here

function hosting_subdirs_alter_alias_validation in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 subdirs/hosting_subdirs.module \hosting_subdirs_alter_alias_validation()

Replace the normal alias validation with one that will accept subdirs.

1 string reference to 'hosting_subdirs_alter_alias_validation'
hosting_subdirs_form_alter in subdirs/hosting_subdirs.module
Implements hook_form_alter().

File

subdirs/hosting_subdirs.module, line 52
Allow sites to be installed in subdirectories.

Code

function hosting_subdirs_alter_alias_validation($form, $form_state) {
  $alias_validation = array_search('hosting_alias_site_form_validate', $form['#validate']);
  if ($alias_validation) {
    unset($form['#validate'][$alias_validation]);
  }
  $form['#validate'][] = 'hosting_subdirs_site_form_validate';
  return $form;
}