diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-05-22 08:37:08 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-05-22 08:37:08 +0200 |
commit | 6f62715f9d9f69a052a9a61674f7cc36b7c63feb (patch) | |
tree | 78bd035ac234b6ada560719525b67ed5a1e23982 /installer/index.php | |
parent | 85788314d64139937b094774aa911809a6bb5f66 (diff) |
Always use 1 step as a fallback (#1488490)
Diffstat (limited to 'installer/index.php')
-rw-r--r-- | installer/index.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/installer/index.php b/installer/index.php index 65e84a3b4..bb1b1ba48 100644 --- a/installer/index.php +++ b/installer/index.php @@ -127,14 +127,23 @@ if ($RCI->configured && empty($_REQUEST['_step'])) { echo '</div></body></html>'; exit; } - + ?> <h1>Roundcube Webmail Installer</h1> <ol id="progress"> <?php - + $include_steps = array( + 1 => './check.php', + 2 => './config.php', + 3 => './test.php', + ); + + if (!in_array($RCI->step, array_keys($include_steps))) { + $RCI->step = 1; + } + foreach (array('Check environment', 'Create config', 'Test config') as $i => $item) { $j = $i + 1; $link = ($RCI->step >= $j || $RCI->configured) ? '<a href="./index.php?_step='.$j.'">' . Q($item) . '</a>' : Q($item); @@ -144,15 +153,8 @@ if ($RCI->configured && empty($_REQUEST['_step'])) { </ol> <?php -$include_steps = array('', './check.php', './config.php', './test.php'); -if ($include_steps[$RCI->step]) { - include $include_steps[$RCI->step]; -} -else { - header("HTTP/1.0 404 Not Found"); - echo '<h2 class="error">Invalid step</h2>'; -} +include $include_steps[$RCI->step]; ?> </div> |