Update installer to use new config format

This commit is contained in:
Kijin Sung 2016-02-03 15:39:58 +09:00
parent 28af7b95cf
commit 0b1fa79f43
15 changed files with 287 additions and 424 deletions

View file

@ -132,14 +132,21 @@ class ModuleHandler extends Handler
{
continue;
}
$urlInfo = parse_url($url);
$host = $urlInfo['host'];
$dbInfo = Context::getDBInfo();
$defaultUrlInfo = parse_url($dbInfo->default_url);
$defaultHost = $defaultUrlInfo['host'];
$defaultUrl = Context::getDBInfo()->default_url;
if($defaultUrl)
{
$defaultUrlInfo = parse_url($defaultUrl);
$defaultHost = $defaultUrlInfo['host'];
}
else
{
$defaultHost = $_SERVER['HTTP_HOST'];
}
if($host && ($host != $defaultHost && $host != $site_module_info->domain))
{
throw new Exception('msg_default_url_is_null');