From a685a8dee989727a73ac3bf377d667a79a834469 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Fri, 2 Aug 2013 11:00:26 +1200 Subject: [PATCH] FIX Include flushtoken when install redirects to successfullyinstalled --- dev/install/install.php5 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dev/install/install.php5 b/dev/install/install.php5 index 890250e7c..33c124d67 100644 --- a/dev/install/install.php5 +++ b/dev/install/install.php5 @@ -1222,8 +1222,12 @@ PHP $this->statusMessage("Checking that friendly URLs work..."); $this->checkRewrite(); } else { + require_once 'core/startup/ParameterConfirmationToken.php'; + $token = new ParameterConfirmationToken('flush'); + $params = http_build_query($token->params()); + $destinationURL = 'index.php/' . - ($this->checkModuleExists('cms') ? 'home/successfullyinstalled?flush=1' : '?flush=1'); + ($this->checkModuleExists('cms') ? "home/successfullyinstalled?$params" : "?$params"); echo <<SilverStripe successfully installed; I am now redirecting you to your SilverStripe site... @@ -1361,8 +1365,12 @@ TEXT; } function checkRewrite() { + require_once 'core/startup/ParameterConfirmationToken.php'; + $token = new ParameterConfirmationToken('flush'); + $params = http_build_query($token->params()); + $destinationURL = str_replace('install.php', '', $_SERVER['SCRIPT_NAME']) . - ($this->checkModuleExists('cms') ? 'home/successfullyinstalled?flush=1' : '?flush=1'); + ($this->checkModuleExists('cms') ? "home/successfullyinstalled?$params" : "?$params"); echo <<Testing...