Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1046503
D404.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jun 28, 7:35 PM
Size
1 KB
Mime Type
text/x-diff
Expires
Sun, Jun 29, 7:35 PM (2 h, 26 m)
Engine
blob
Format
Raw Data
Handle
676540
Attached To
D404: INP-1801 - Use dynamic protocol during installation
D404.id.diff
View Options
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
Log In to Comment