You are here

function hosting_get_site_by_url in Hosting 5

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

Retrieve a node based on the url

1 call to hosting_get_site_by_url()
hosting_platform_post_hosting_verify_task in platform/hosting_platform.drush.inc
Implementation hook_post_verify

File

site/hosting_site.module, line 127

Code

function hosting_get_site_by_url($url) {
  $nid = db_result(db_query("SELECT nid FROM {node} WHERE title='%s' AND type = 'site' AND NOT (status=%d)", $url, HOSTING_SITE_DELETED));
  if ($nid) {
    return node_load($nid);
  }
  return false;
}