function drush_sitealias_is_bootstrapped_site

8.0.x sitealias.inc drush_sitealias_is_bootstrapped_site($alias_record)
6.x sitealias.inc drush_sitealias_is_bootstrapped_site($alias_record)
7.x sitealias.inc drush_sitealias_is_bootstrapped_site($alias_record)
3.x sitealias.inc drush_sitealias_is_bootstrapped_site($alias_record)
4.x sitealias.inc drush_sitealias_is_bootstrapped_site($alias_record)
5.x sitealias.inc drush_sitealias_is_bootstrapped_site($alias_record)
master sitealias.inc drush_sitealias_is_bootstrapped_site($alias_record)

Check to see if we have already bootstrapped to a site.

1 call to drush_sitealias_is_bootstrapped_site()
drush_sitealias_resolve_path_references in includes/sitealias.inc
If there are any path aliases (items beginning with "%") in the test string, then resolve them as path aliases and add them to the provided alias record.

File

includes/sitealias.inc, line 1031
The site alias API.

Code

function drush_sitealias_is_bootstrapped_site($alias_record) {
  if (!isset($alias_record['remote-host']) && array_key_exists('root', $alias_record)) {
    $self_record = drush_sitealias_get_record("@self");
    if (empty($self_record) || !array_key_exists('root', $self_record)) {
      // TODO:  If we have not bootstrapped to a site yet, we could
      // perhaps bootstrap to $alias_record here.
      return FALSE;
    }
    elseif (($alias_record['root'] == $self_record['root']) && ($alias_record['uri'] == $self_record['uri'])) {
      return TRUE;
    }
  }
  return FALSE;
}