Page MenuHomeIn-Portal Phabricator

D404.diff
No OneTemporary

File Metadata

Created
Sat, Apr 19, 7:20 PM

D404.diff

Index: branches/5.2.x/core/install.php
===================================================================
--- branches/5.2.x/core/install.php
+++ branches/5.2.x/core/install.php
@@ -160,7 +160,11 @@
$this->toolkit = new kInstallToolkit();
$this->toolkit->setInstallator($this);
$this->StepDBFile = FULL_PATH.'/'.REL_PATH.'/install/steps_db.xml';
- $this->baseURL = 'http://' . $_SERVER['HTTP_HOST'] . $this->toolkit->systemConfig->get('WebsitePath', 'Misc') . '/core/install/';
+
+ $https_mark = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : false;
+ $protocol = ($https_mark == 'on') || ($https_mark == '1') ? 'https://' : 'http://';
+ $this->baseURL = $protocol . $_SERVER['HTTP_HOST'] . $this->toolkit->systemConfig->get('WebsitePath', 'Misc') . '/core/install/';
+
set_error_handler( Array(&$this, 'ErrorHandler') );
if ( $this->toolkit->systemConfigFound() ) {
Index: branches/5.2.x/core/kernel/startup.php
===================================================================
--- branches/5.2.x/core/kernel/startup.php
+++ branches/5.2.x/core/kernel/startup.php
@@ -30,7 +30,7 @@
echo 'Please use the installation script to fix the problem.<br/><br/>';
$base_path = rtrim(str_replace('\\', '/', dirname($_SERVER['PHP_SELF'])), '/');
- echo '<a href="http://' . $_SERVER['HTTP_HOST'] . $base_path . '/core/install.php">Go to installation script</a><br/><br/>';
+ echo '<a href="//' . $_SERVER['HTTP_HOST'] . $base_path . '/core/install.php">Go to installation script</a><br/><br/>';
flush();
exit;
}

Event Timeline