Permalink
Browse files

FIX Include flushtoken when install redirects to successfullyinstalled

  • Loading branch information...
1 parent 3420587 commit a685a8dee989727a73ac3bf377d667a79a834469 Hamish Friedlander committed Aug 1, 2013
Showing with 10 additions and 2 deletions.
  1. +10 −2 dev/install/install.php5
View
@@ -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 <<<HTML
<li>SilverStripe successfully installed; I am now redirecting you to your SilverStripe site...</li>
@@ -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 <<<HTML
<li id="ModRewriteResult">Testing...</li>

0 comments on commit a685a8d

Please sign in to comment.