From d81d69377a53f347eab1bef898dc405d3b5940e9 Mon Sep 17 00:00:00 2001
From: PhilW <roundcube@tehinterweb.co.uk>
Date: Mon, 26 Aug 2013 08:45:30 -0400
Subject: [PATCH] use template file name rather than special attribute
---
program/lib/Roundcube/bootstrap.php | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php
index 182ea12..5d5a223 100644
--- a/program/lib/Roundcube/bootstrap.php
+++ b/program/lib/Roundcube/bootstrap.php
@@ -58,7 +58,7 @@
define('RCUBE_CHARSET', 'UTF-8');
if (!defined('RCUBE_LIB_DIR')) {
- define('RCUBE_LIB_DIR', dirname(__FILE__).'/');
+ define('RCUBE_LIB_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR);
}
if (!defined('RCUBE_INSTALL_PATH')) {
@@ -83,6 +83,16 @@
@mb_regex_encoding(RCUBE_CHARSET);
}
+// make sure the Roundcube lib directory is in the include_path
+$rcube_path = realpath(RCUBE_LIB_DIR . '..');
+$sep = PATH_SEPARATOR;
+$regexp = "!(^|$sep)" . preg_quote($rcube_path, '!') . "($sep|\$)!";
+$path = ini_get('include_path');
+
+if (!preg_match($regexp, $path)) {
+ set_include_path($path . PATH_SEPARATOR . $rcube_path);
+}
+
// Register autoloader
spl_autoload_register('rcube_autoload');
--
Gitblit v1.9.1