diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-04-12 13:54:45 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-04-12 13:54:45 +0000 |
| commit | 83a4e859f8ae505f06c184eb60577529ff6c4be8 (patch) | |
| tree | eea0a263dd79a697205db95f0a3b5600e6aa70c9 /roundcubemail/installer/index.php | |
| parent | 1d297be10effab84c7e084bfc70651f99b10e91b (diff) | |
Changed codebase to PHP5 with autoloader + added some new classes from the devel-vnext branch
git-svn-id: https://svn.roundcube.net/trunk@1291 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/installer/index.php')
| -rw-r--r-- | roundcubemail/installer/index.php | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/roundcubemail/installer/index.php b/roundcubemail/installer/index.php index cb5f3febd..f6fa47975 100644 --- a/roundcubemail/installer/index.php +++ b/roundcubemail/installer/index.php @@ -3,8 +3,26 @@ 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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> @@ -32,11 +50,6 @@ session_start(); <?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(); |
