function hosting_task_clone_form_validate in Hostmaster (Aegir) 6
Implementation of hook_hosting_task_TASK_TYPE_form_validate().
File
- modules/
hosting/ clone/ hosting_clone.module, line 34 - Allow sites to be cloned.
Code
function hosting_task_clone_form_validate($form, &$form_state) {
$site = $form['parameters']['#node'];
$url = strtolower(trim($form_state['values']['parameters']['new_uri']));
// domain names are case-insensitive
if ($url == strtolower(trim($site->title))) {
form_set_error('new_uri', t("To clone a site you need to specify a new Domain name to clone it to."));
}
else {
hosting_task_migrate_form_validate($form, $form_state);
}
}