You are here

function hosting_site_allow_domain in Hosting 6.2

Same name and namespace in other branches
  1. 5 site/hosting_site.module \hosting_site_allow_domain()
  2. 7.4 site/hosting_site.module \hosting_site_allow_domain()
  3. 7.3 site/hosting_site.module \hosting_site_allow_domain()

Implementation of hook_allow_domain().

See also

hosting_domain_allowed()

File

site/hosting_site.module, line 634

Code

function hosting_site_allow_domain($url, $params = array()) {
  $query = "SELECT COUNT(n.nid) FROM {node} n \n    JOIN {hosting_site} h ON n.nid = h.nid\n    WHERE type='site' AND title='%s' AND h.status <> %d ";
  $args[] = $url;
  $args[] = HOSTING_SITE_DELETED;
  if (isset($params['nid'])) {
    $query .= ' AND n.nid <> %d';
    $args[] = $params['nid'];
  }
  $result = !db_result(db_query($query, $args));
  return $result;
}