Commit 71b3ff15 authored by mig5's avatar mig5

add a conditional when validating site aliases to ensure that not only do no...

add a conditional when validating site aliases to ensure that not only do no other sites use this alias, but that it isn't identical to the site name itself. Fixes #1333978 redirect loop
parent f219e6e5
......@@ -206,7 +206,7 @@ function hosting_alias_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
$aliases = explode("\n", $node->aliases);
foreach ($aliases as $alias) {
if ($alias = trim($alias)) {
if (!hosting_domain_allowed($alias, (array) $node)) {
if (!hosting_domain_allowed($alias, array('nid' => $node->nid)) || $alias == $node->title) {
form_set_error('aliases', t('The domain name @alias is already in use', array('@alias' => $alias)));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment