From debd0f85155903b4983b6f6e5f14721e282b00fc Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Fri, 16 Aug 2013 04:13:26 -0400
Subject: [PATCH] Let the framework adjust the include_path if necessary

---
 program/lib/Roundcube/bootstrap.php |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php
index b659955..c5c785b 100644
--- a/program/lib/Roundcube/bootstrap.php
+++ b/program/lib/Roundcube/bootstrap.php
@@ -84,6 +84,13 @@
     @mb_regex_encoding(RCUBE_CHARSET);
 }
 
+// make sure the lib directory is in the include_path
+$rcube_include_path = realpath(RCUBE_LIB_DIR . '..');
+$sep = PATH_SEPARATOR;
+if (!preg_match("!(^|$sep)$rcube_include_path($sep|\$)!", ini_get('include_path'))) {
+    set_include_path(ini_get('include_path') . PATH_SEPARATOR . $rcube_include_path);
+}
+
 // Register autoloader
 spl_autoload_register('rcube_autoload');
 

--
Gitblit v1.9.1