mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Fix #801 autodetect http or https port on installation
This commit is contained in:
parent
141aabdaf7
commit
4d1df5701d
1 changed files with 3 additions and 2 deletions
|
|
@ -22,14 +22,15 @@ class module extends ModuleObject
|
|||
if(!getModel('module')->getDefaultDomainInfo())
|
||||
{
|
||||
$current_url = Rhymix\Framework\Url::getCurrentUrl();
|
||||
$current_port = intval(parse_url($current_url, PHP_URL_PORT)) ?: null;
|
||||
$domain = new stdClass();
|
||||
$domain->domain_srl = 0;
|
||||
$domain->domain = Rhymix\Framework\URL::getDomainFromURL($current_url);
|
||||
$domain->is_default_domain = 'Y';
|
||||
$domain->index_module_srl = 0;
|
||||
$domain->index_document_srl = 0;
|
||||
$domain->http_port = null;
|
||||
$domain->https_port = null;
|
||||
$domain->http_port = RX_SSL ? null : $current_port;
|
||||
$domain->https_port = RX_SSL ? $current_port : null;
|
||||
$domain->security = config('url.ssl') ?: 'none';
|
||||
$domain->description = '';
|
||||
$domain->settings = json_encode(array('language' => null, 'timezone' => null));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue