From d778536f126953a704ce50b17c9cbdf80bbc3088 Mon Sep 17 00:00:00 2001 From: thomasb Date: Fri, 28 Mar 2008 19:42:35 +0000 Subject: Disable installer by default; add config option to enable it again git-svn-id: https://svn.roundcube.net/trunk@1222 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/installer/config.php | 3 +++ roundcubemail/installer/index.php | 15 +++++++++++++-- roundcubemail/installer/rcube_install.php | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) (limited to 'roundcubemail/installer') diff --git a/roundcubemail/installer/config.php b/roundcubemail/installer/config.php index 5b365a5a5..9845bb3f3 100644 --- a/roundcubemail/installer/config.php +++ b/roundcubemail/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/roundcubemail/installer/index.php b/roundcubemail/installer/index.php index 3b144dfae..69e33f870 100644 --- a/roundcubemail/installer/index.php +++ b/roundcubemail/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

+