function sitealias_find_local_drupal_root

8.0.x sitealias.inc sitealias_find_local_drupal_root($site_list)
6.x sitealias.inc sitealias_find_local_drupal_root($site_list)
7.x sitealias.inc sitealias_find_local_drupal_root($site_list)
4.x sitealias.inc sitealias_find_local_drupal_root($site_list)
5.x sitealias.inc sitealias_find_local_drupal_root($site_list)
master sitealias.inc sitealias_find_local_drupal_root($site_list)

File

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

Code

function sitealias_find_local_drupal_root($site_list) {
  $drupal_root = NULL;

  foreach ($site_list as $site) {
    if (($drupal_root == NULL) && (array_key_exists('root', $site) && !array_key_exists('remote-host', $site))) {
      $drupal_root = $site['root'];
    }
  }

  return $drupal_root;
}