Branch 'kolab-webadmin-2.4' - lib/kolab_client_output.php
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Mon Jun 4 16:16:59 CEST 2012
lib/kolab_client_output.php | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
New commits:
commit 19616b7d463e9107e9f4f13b4742abae67f19eac
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Mon Jun 4 16:16:25 2012 +0200
Use fallback locations for the location of the Smarty 3 class file(s)
diff --git a/lib/kolab_client_output.php b/lib/kolab_client_output.php
index 6454acf..9fe611f 100644
--- a/lib/kolab_client_output.php
+++ b/lib/kolab_client_output.php
@@ -51,7 +51,18 @@ class kolab_client_output
*/
private function init()
{
- require_once 'Smarty/Smarty.class.php';
+ $smarty_path = array('Smarty', 'smarty3', 'smarty');
+
+ if ($path = $conf->get('kolab_wap', 'smarty_path')) {
+ array_unshift($smarty_path, $path);
+ }
+
+ foreach ($smarty_path as $path) {
+ @include_once "$path/Smarty.class.php";
+ if (class_exists('Smarty', false)) {
+ break;
+ }
+ }
$SMARTY = new Smarty;
More information about the commits
mailing list