Thomas Bruederli
2012-11-25 dc088e25c2e96969705de7424bf18390b1505354
Fix installer to work with the new framework architecture
3 files modified
1 files deleted
78 ■■■■ changed files
installer/index.php 12 ●●●● patch | view | raw | blame | history
installer/rcube_install.php 6 ●●●● patch | view | raw | blame | history
installer/test.php 4 ●●●● patch | view | raw | blame | history
installer/utils.php 56 ●●●●● patch | view | raw | blame | history
installer/index.php
@@ -40,8 +40,8 @@
ini_set('display_errors', 1);
define('INSTALL_PATH', realpath(dirname(__FILE__) . '/../').'/');
define('RCMAIL_CONFIG_DIR', INSTALL_PATH . 'config');
define('RCMAIL_CHARSET', 'UTF-8');
define('RCUBE_INSTALL_PATH', INSTALL_PATH);
define('RCUBE_CONFIG_DIR', INSTALL_PATH . 'config');
$include_path  = INSTALL_PATH . 'program/lib' . PATH_SEPARATOR;
$include_path .= INSTALL_PATH . 'program' . PATH_SEPARATOR;
@@ -50,10 +50,10 @@
set_include_path($include_path);
require_once 'utils.php';
require_once 'rcube_shared.inc';
require_once 'Roundcube/bootstrap.php';
require_once 'rcube_install.php';
// deprecated aliases (to be removed)
require_once 'rcube_bc.inc';
require_once 'bc.php';
session_start();
@@ -123,7 +123,7 @@
  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 RCMAIL_CONFIG_DIR/main.inc.php</p>';
    echo '<p>To enable it again, set <tt>$rcmail_config[\'enable_installer\'] = true;</tt> in RCUBE_CONFIG_DIR/main.inc.php</p>';
    echo '</div></body></html>';
    exit;
  }
installer/rcube_install.php
@@ -109,12 +109,12 @@
   */
  function _load_config($suffix)
  {
    if (is_readable($main_inc = RCMAIL_CONFIG_DIR . '/main.inc' . $suffix)) {
    if (is_readable($main_inc = RCUBE_CONFIG_DIR . '/main.inc' . $suffix)) {
      include($main_inc);
      if (is_array($rcmail_config))
        $this->config += $rcmail_config;
    }
    if (is_readable($db_inc = RCMAIL_CONFIG_DIR . '/db.inc'. $suffix)) {
    if (is_readable($db_inc = RCUBE_CONFIG_DIR . '/db.inc'. $suffix)) {
      include($db_inc);
      if (is_array($rcmail_config))
        $this->config += $rcmail_config;
@@ -149,7 +149,7 @@
   */
  function create_config($which, $force = false)
  {
    $out = @file_get_contents(RCMAIL_CONFIG_DIR . "/{$which}.inc.php.dist");
    $out = @file_get_contents(RCUBE_CONFIG_DIR . "/{$which}.inc.php.dist");
    if (!$out)
      return '[Warning: could not read the config template file]';
installer/test.php
@@ -3,8 +3,8 @@
<h3>Check config files</h3>
<?php
$read_main = is_readable(RCMAIL_CONFIG_DIR.'/main.inc.php');
$read_db = is_readable(RCMAIL_CONFIG_DIR.'/db.inc.php');
$read_main = is_readable(RCUBE_CONFIG_DIR.'/main.inc.php');
$read_db = is_readable(RCUBE_CONFIG_DIR.'/db.inc.php');
if ($read_main && !empty($RCI->config)) {
  $RCI->pass('main.inc.php');
installer/utils.php
File was deleted