Merge branch '3.0'
authorAlexander Ebert <ebert@woltlab.com>
Sat, 19 May 2018 18:35:22 +0000 (20:35 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 19 May 2018 18:35:22 +0000 (20:35 +0200)
1  2 
wcfsetup/install/files/lib/system/session/SessionHandler.class.php
wcfsetup/install/files/lib/util/HeaderUtil.class.php

index 74a499f3b6a89c3148aa1f391ff3664a048e1b7d,9fc082fad8be47819fb62674a85127aba45e5393..6c8d5f92d8d0175d081e7b892541cae2c04ddeff
@@@ -162,9 -163,14 +163,14 @@@ final class HeaderUtil 
         * @param       boolean         $temporaryRedirect 
         */
        public static function redirect($location, $sendStatusCode = false, $temporaryRedirect = true) {
+               // https://github.com/WoltLab/WCF/issues/2568
+               if (SessionHandler::getInstance()->isFirstVisit()) {
+                       SessionHandler::getInstance()->register('__wcfIsFirstVisit', true);
+               }
+               
                if ($sendStatusCode) {
                        if ($temporaryRedirect) @header('HTTP/1.1 307 Temporary Redirect');
 -                      else @header('HTTP/1.0 301 Moved Permanently');
 +                      else @header('HTTP/1.1 301 Moved Permanently');
                }
                
                header('Location: '.$location);