MINOR now writes the default site to the hostmap (from r81679)

This commit is contained in:
Tom Rix 2010-03-01 02:53:51 +00:00
parent b1ccc1220e
commit f7054e00b0

View File

@ -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);
}
} }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////