Included protocol and domain in base tag
authorAlexander Ebert <ebert@woltlab.com>
Wed, 19 Oct 2011 12:36:01 +0000 (14:36 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 19 Oct 2011 12:36:01 +0000 (14:36 +0200)
Internet Explorer requires an absolute URI with protocol and domain as value for base-tag - whereas any other browser is happy with just a relative URI :/

wcfsetup/install/files/lib/system/WCFACP.class.php

index a2dbd8df4793a761a7fc968764797d220b5286a2..0d75545cb6f858db39cf33768277f01fd5a52f2c 100644 (file)
@@ -96,6 +96,13 @@ class WCFACP extends WCF {
                        $phpSelf = substr($phpSelf, 0, $pos);
                }
                
+               // get protocol and domain name
+               $protocol = 'http://';
+               if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' || $_SERVER['SERVER_PORT'] == 443) {
+                       $protocol = 'https://';
+               }
+               $phpSelf = $protocol . $_SERVER['HTTP_HOST'] .  $phpSelf;
+               
                self::getTPL()->assign(array(
                        'baseHref' => $phpSelf,
                        'quickAccessPackages' => $this->getQuickAccessPackages(),