function hosting_task_clone_form_validate in Hosting 6.2
Same name and namespace in other branches
- 7.4 clone/hosting_clone.module \hosting_task_clone_form_validate()
- 7.3 clone/hosting_clone.module \hosting_task_clone_form_validate()
Implementation of hook_hosting_task_TASK_TYPE_form_validate().
File
- 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);
}
}