From 9bacb2cd3f7e8f96a29f651460954965c400aac6 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Fri, 28 Jun 2013 16:27:59 -0400 Subject: [PATCH] Prepare config migration: - Show warning in installer and hints how to migrate - Let update.sh create the new config file if legacy config is detected - Provide a sample config file for manual configuration - Define a list of options which always should be written to local config --- installer/index.php | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/installer/index.php b/installer/index.php index 4e4a043..dc4c0a4 100644 --- a/installer/index.php +++ b/installer/index.php @@ -121,8 +121,16 @@ // 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 RCUBE_CONFIG_DIR/config.inc.php</p>'; + if ($RCI->configured && $RCI->legacy_config) { + echo '<h2 class="error">Your configuration needs to be migrated!</h2>'; + echo '<p>We changed the configuration files structure and your installation needs to be updated accordingly.</p>'; + echo '<p>Please run the <tt>bin/update.sh</tt> script from the command line or set <p> <tt>$rcmail_config[\'enable_installer\'] = true;</tt></p>'; + echo ' in your RCUBE_CONFIG_DIR/main.inc.php to let the installer help you migrating it.</p>'; + } + else { + echo '<h2 class="error">The installer is disabled!</h2>'; + echo '<p>To enable it again, set <tt>$rcmail_config[\'enable_installer\'] = true;</tt> in RCUBE_CONFIG_DIR/config.inc.php</p>'; + } echo '</div></body></html>'; exit; } -- Gitblit v1.9.1