equal
deleted
inserted
replaced
639 */ |
639 */ |
640 function domain_exists($domain) |
640 function domain_exists($domain) |
641 { |
641 { |
642 global $db; |
642 global $db; |
643 |
643 |
644 if (is_valid_domain($domain)) { |
644 if (is_valid_hostname_fqdn($domain)) { |
645 $result = $db->query("SELECT id FROM domains WHERE name=".$db->quote($domain)); |
645 $result = $db->query("SELECT id FROM domains WHERE name=".$db->quote($domain)); |
646 if ($result->numRows() == 0) { |
646 if ($result->numRows() == 0) { |
647 return false; |
647 return false; |
648 } elseif ($result->numRows() >= 1) { |
648 } elseif ($result->numRows() >= 1) { |
649 return true; |
649 return true; |