// normalization / minor fix in php upgrader files
This commit is contained in:
@@ -27,9 +27,14 @@
|
||||
|
||||
function shop_url()
|
||||
{
|
||||
if (!($host = Configuration::get('CANONICAL_URL')))
|
||||
$host = Tools::getHttpHost();
|
||||
Configuration::updateValue('PS_SHOP_DOMAIN', $host);
|
||||
Configuration::updateValue('PS_SHOP_DOMAIN_SSL', $host);
|
||||
$host = Db::getInstance()->getValue('SELECT value FROM `'._DB_PREFIX_.'configuration`
|
||||
WHERE name="CANONICAL_URL"');
|
||||
if (!$host)
|
||||
$host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST']);
|
||||
$res = Db::getInstance()->getValue('REPLACE INTO `'._DB_PREFIX_.'configuration`
|
||||
(name, value) VALUES
|
||||
("PS_SHOP_DOMAIN", "'.$host.'"),
|
||||
("PS_SHOP_DOMAIN_SSL", "'.$host.'")
|
||||
');
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user