function hosting_site_allow_domain in Hosting 6.2
Same name and namespace in other branches
- 5 site/hosting_site.module \hosting_site_allow_domain()
- 7.4 site/hosting_site.module \hosting_site_allow_domain()
- 7.3 site/hosting_site.module \hosting_site_allow_domain()
Implementation of hook_allow_domain().
See also
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;
}