alecpl
2010-07-30 2537686d1dc06c7b0588bc4663342a052ebaca6e
installer/index.php
@@ -1,4 +1,5 @@
<?php
ini_set('error_reporting', E_ALL&~E_NOTICE);
ini_set('display_errors', 1);
@@ -12,21 +13,10 @@
set_include_path($include_path);
session_start();
require_once 'utils.php';
require_once 'main.inc';
/**
 * Use PHP5 autoload for dynamic class loading
 * (copy from program/incllude/iniset.php)
 */
function __autoload($classname)
{
  $filename = preg_replace(
      array('/MDB2_(.+)/', '/Mail_(.+)/', '/^html_.+/', '/^utf8$/'),
      array('MDB2/\\1', 'Mail/\\1', 'html', 'utf8.class'),
      $classname
  );
  include_once $filename. '.php';
}
session_start();
$RCI = rcube_install::get_instance();
$RCI->load_config();
@@ -57,9 +47,9 @@
  exit;
}
// go to 'test' step if we have a local configuration
// go to 'check env' step if we have a local configuration
if ($RCI->configured && empty($_REQUEST['_step'])) {
  header("Location: ./?_step=3");
  header("Location: ./?_step=1");
  exit;
}
@@ -69,7 +59,8 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>RoundCube Webmail Installer</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="Robots" content="noindex,nofollow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="styles.css" />
<script type="text/javascript" src="client.js"></script>
</head>
@@ -115,7 +106,7 @@
</ol>
<?php
$include_steps = array('welcome.html', 'check.php', 'config.php', 'test.php');
$include_steps = array('./welcome.html', './check.php', './config.php', './test.php');
if ($include_steps[$RCI->step]) {
  include $include_steps[$RCI->step];