From 47124c2279382714afd8dbe4a867a867ea179199 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sat, 12 Apr 2008 09:54:45 -0400
Subject: [PATCH] Changed codebase to PHP5 with autoloader + added some new classes from the devel-vnext branch
---
installer/index.php | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/installer/index.php b/installer/index.php
index cb5f3fe..f6fa479 100644
--- a/installer/index.php
+++ b/installer/index.php
@@ -3,7 +3,25 @@
ini_set('error_reporting', E_ALL&~E_NOTICE);
ini_set('display_errors', 1);
+define('INSTALL_PATH', realpath(dirname(__FILE__) . '/../').'/');
+$include_path = INSTALL_PATH . 'program/lib' . PATH_SEPARATOR . INSTALL_PATH . 'program' . PATH_SEPARATOR . INSTALL_PATH . 'program/include' . PATH_SEPARATOR . ini_get('include_path');
+set_include_path($include_path);
+
session_start();
+
+/**
+ * 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';
+}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -32,11 +50,6 @@
<?php
- $docroot = realpath(dirname(__FILE__) . '/../');
- $include_path = $docroot . '/program/lib' . PATH_SEPARATOR . $docroot . '/program' . PATH_SEPARATOR . ini_get('include_path');
- set_include_path($include_path);
-
- require_once 'rcube_install.php';
$RCI = rcube_install::get_instance();
$RCI->load_config();
--
Gitblit v1.9.1