diff options
Diffstat (limited to 'installer')
-rw-r--r-- | installer/config.php | 3 | ||||
-rw-r--r-- | installer/index.php | 15 | ||||
-rw-r--r-- | installer/rcube_install.php | 2 |
3 files changed, 17 insertions, 3 deletions
diff --git a/installer/config.php b/installer/config.php index 5b365a5a5..9845bb3f3 100644 --- a/installer/config.php +++ b/installer/config.php @@ -20,6 +20,9 @@ $RCI->config_props = array( 'htmleditor' => 1, ); +// allow the current user to get to the next step +$_SESSION['allowinstaller'] = true; + if (!empty($_POST['submit'])) { echo '<p class="notice">Copy the following configurations and save them in two files (names above the text box)'; diff --git a/installer/index.php b/installer/index.php index 3b144dfae..69e33f870 100644 --- a/installer/index.php +++ b/installer/index.php @@ -22,11 +22,11 @@ <div id="content"> -<h1>RoundCube Webmail Installer</h1> - <?php ini_set('error_reporting', E_ALL&~E_NOTICE); ini_set('display_errors', 1); + + session_start(); $docroot = realpath(dirname(__FILE__) . '/../'); $include_path = $docroot . '/program/lib' . PATH_SEPARATOR . $docroot . '/program' . PATH_SEPARATOR . ini_get('include_path'); @@ -35,9 +35,20 @@ require_once 'rcube_install.php'; $RCI = rcube_install::get_instance(); $RCI->load_config(); + + // exit if installation is complete + if ($RCI->configured && !$RCI->getprop('enable_installer') && !$_SESSION['allowinstaller']) { + header("HTTP/1.0 404 Not Found"); + echo '<h2 class="error">The installer is disabled!</h2>'; + echo '<p>To enable it again, set <tt>$rcmail_config[\'enable_installer\'] = true;</tt> in config/main.inc.php</p>'; + echo '</div></body></html>'; + exit; + } ?> +<h1>RoundCube Webmail Installer</h1> + <ol id="progress"> <?php diff --git a/installer/rcube_install.php b/installer/rcube_install.php index 8caa79d02..07a9922b7 100644 --- a/installer/rcube_install.php +++ b/installer/rcube_install.php @@ -171,7 +171,7 @@ class rcube_install $out); } - return $out; + return trim($out); } |