FIX Include flushtoken when install redirects to successfullyinstalled

This commit is contained in:
Hamish Friedlander 2013-08-02 11:00:26 +12:00
parent 342058742c
commit a685a8dee9

View File

@ -1222,8 +1222,12 @@ PHP
$this->statusMessage("Checking that friendly URLs work..."); $this->statusMessage("Checking that friendly URLs work...");
$this->checkRewrite(); $this->checkRewrite();
} else { } else {
require_once 'core/startup/ParameterConfirmationToken.php';
$token = new ParameterConfirmationToken('flush');
$params = http_build_query($token->params());
$destinationURL = 'index.php/' . $destinationURL = 'index.php/' .
($this->checkModuleExists('cms') ? 'home/successfullyinstalled?flush=1' : '?flush=1'); ($this->checkModuleExists('cms') ? "home/successfullyinstalled?$params" : "?$params");
echo <<<HTML echo <<<HTML
<li>SilverStripe successfully installed; I am now redirecting you to your SilverStripe site...</li> <li>SilverStripe successfully installed; I am now redirecting you to your SilverStripe site...</li>
@ -1361,8 +1365,12 @@ TEXT;
} }
function checkRewrite() { 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']) . $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 echo <<<HTML
<li id="ModRewriteResult">Testing...</li> <li id="ModRewriteResult">Testing...</li>