From 967b342039261ab294fe85d806fe49ce16391ada Mon Sep 17 00:00:00 2001 From: thomascube Date: Fri, 28 Mar 2008 19:42:35 +0000 Subject: Disable installer by default; add config option to enable it again --- installer/config.php | 3 +++ installer/index.php | 15 +++++++++++++-- installer/rcube_install.php | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) (limited to 'installer') 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 '

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 @@

-

RoundCube Webmail Installer

- load_config(); + + // exit if installation is complete + if ($RCI->configured && !$RCI->getprop('enable_installer') && !$_SESSION['allowinstaller']) { + header("HTTP/1.0 404 Not Found"); + echo '

The installer is disabled!

'; + echo '

To enable it again, set $rcmail_config[\'enable_installer\'] = true; in config/main.inc.php

'; + echo '
'; + exit; + } ?> +

RoundCube Webmail Installer

+