Skip to content

Commit

Permalink
Merge pull request drush-ops#362 from jurgenhaas/patch-1
Browse files Browse the repository at this point in the history
Bug fix for drush-ops#339. Enhance drush_sitealias_local_site_path() to first look into the sites.php (if present) to determine the local site path.
  • Loading branch information
weitzman committed Jan 16, 2014
2 parents 3d9e39f + e2d234a commit d543098
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion includes/sitealias.inc
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,16 @@ function drush_sitealias_local_site_path($alias_record) {

if (isset($alias_record['root']) && !isset($alias_record['remote-host'])) {
if (isset($alias_record['uri'])) {
$result = ($alias_record['root'] . '/sites/' . drush_sitealias_uri_to_site_dir($alias_record['uri']));
if (file_exists($alias_record['root'] . '/sites/sites.php')) {
$sites = array();
include($alias_record['root'] . '/sites/sites.php');
if (array_key_exists($alias_record['uri'], $sites)) {
$result = $alias_record['root'] . '/sites/' . $sites[$alias_record['uri']];
}
}
if (!$result) {
$result = ($alias_record['root'] . '/sites/' . drush_sitealias_uri_to_site_dir($alias_record['uri']));
}
$result = realpath($result);
}
if (!$result) {
Expand Down

0 comments on commit d543098

Please sign in to comment.