Commit 45dabc85 authored by Chris Moates's avatar Chris Moates Committed by ergonlogic

Fix alias handling when using subdirs support (Drupal bug 2213387)

When the subdir module is enabled and subdirs are used, the template
that generates sites.php has a logic bug that causes it to unset()
aliases which are not subdir aliases. This patch checks each alias
before deciding whether to munge and unset it, thereby eliminating
the underlying bug.
Signed-off-by: ergonlogic's avatarChristopher Gervais <>
parent 5efc742d
......@@ -48,8 +48,12 @@ print "<?php \n"; ?>
$aliases = d()->aliases;
// Fix our subdir aliases.
foreach ($aliases as $alias) {
$records[str_replace('/', '.', $alias)] = $records[$alias];
// Only replace the records[] array key if the alias is a subdir alias
// Patch for
if(strpos($alias, "/")) {
$records[str_replace('/', '.', $alias)] = $records[$alias];
$sites = <?php print var_export($records, TRUE) ?>;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment