You are here

function hosting_site_allow_domain in Hosting 5

Same name and namespace in other branches
  1. 6.2 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()

File

site/hosting_site.module, line 591

Code

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