Ensure there is a '.' between hostname and domain. Partially fixes #2454

This commit is contained in:
Warren Baker 2012-05-25 12:11:43 +02:00
parent 1b9aff4553
commit ac10faad42

View File

@ -63,13 +63,13 @@ $listenporthttps = $cpcfg['listenporthttps'] ? $cpcfg['listenporthttps'] : ($cpc
$listenporthttp = $cpcfg['listenporthttp'] ? $cpcfg['listenporthttp'] : $cpcfg['zoneid'];
if (isset($config['captiveportal'][$cpzone]['httpslogin']))
$ourhostname = $config['captiveportal'][$cpzone]['httpsname'] . ":" . $listenporthttps;
$ourhostname = $config['captiveportal'][$cpzone]['httpsname'] . ":" . $listenporthttps;
else {
$ifip = portal_ip_from_client_ip($clientip);
if (!$ifip)
$ourhostname = $config['system']['hostname'] . $config['system']['domain'] . ":{$listenporthttp}";
else
$ourhostname = "{$ifip}:{$listenporthttp}";
$ifip = portal_ip_from_client_ip($clientip);
if (!$ifip)
$ourhostname = "{$config['system']['hostname']}.{$config['system']['domain']}:{$listenporthttp}";
else
$ourhostname = "{$ifip}:{$listenporthttp}";
}
if ($orig_host != $ourhostname) {