Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F847878
D404.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, Apr 19, 7:20 PM
Size
1 KB
Mime Type
text/x-diff
Expires
Sun, Apr 20, 7:20 PM (37 m, 35 s)
Engine
blob
Format
Raw Data
Handle
602663
Attached To
D404: INP-1801 - Use dynamic protocol during installation
D404.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