mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
MINOR now writes the default site to the hostmap (from r81679)
This commit is contained in:
parent
b1ccc1220e
commit
f7054e00b0
@ -474,11 +474,14 @@ JS;
|
|||||||
if ($domains) foreach($domains as $domain) {
|
if ($domains) foreach($domains as $domain) {
|
||||||
$hostmap[str_replace('www.', '', $domain->Domain)] = $subsite->domain();
|
$hostmap[str_replace('www.', '', $domain->Domain)] = $subsite->domain();
|
||||||
}
|
}
|
||||||
|
if ($subsite->DefaultSite) $hostmap['default'] = $subsite->domain();
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = '<?php $subsiteHostmap = '.var_export($hostmap, true).' ?>';
|
$data = '<?php $subsiteHostmap = '.var_export($hostmap, true).' ?>';
|
||||||
|
|
||||||
if (is_writable($file)) file_put_contents($file, $data);
|
if (is_writable(dirname($file)) || is_writable($file)) {
|
||||||
|
file_put_contents($file, $data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user