]> git.mxchange.org Git - friendica.git/commitdiff
fetching the hostname from the .htpreconfig.php if present
authorMichael Vogel <icarus@dabo.de>
Thu, 29 May 2014 09:40:54 +0000 (11:40 +0200)
committerMichael Vogel <icarus@dabo.de>
Thu, 29 May 2014 09:40:54 +0000 (11:40 +0200)
boot.php

index 3a9e8c3e725678f1a82f6c102e479c1e2c05bb38..6c1016e1e89a40f554e55e4803bde5a9464ab6c7 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -428,6 +428,8 @@ if(! class_exists('App')) {
 
                        global $default_timezone, $argv, $argc;
 
+                       $hostname = "";
+
                        if (file_exists(".htpreconfig.php"))
                                @include(".htpreconfig.php");
 
@@ -622,11 +624,16 @@ if(! class_exists('App')) {
                        if($parsed) {
                                $this->scheme = $parsed['scheme'];
 
-                               $this->hostname = $parsed['host'];
+                               $hostname = $parsed['host'];
                                if(x($parsed,'port'))
-                                       $this->hostname .= ':' . $parsed['port'];
+                                       $hostname .= ':' . $parsed['port'];
                                if(x($parsed,'path'))
                                        $this->path = trim($parsed['path'],'\\/');
+
+                               if (file_exists(".htpreconfig.php"))
+                                       @include(".htpreconfig.php");
+
+                               $this->hostname = $hostname;
                        }
 
                }