summaryrefslogtreecommitdiffstats
path: root/lib/kolab_client_output.php
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-06-04 16:16:25 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-06-04 16:16:25 +0200
commit9a8393c317aae712c52a0d11d69ac35a685e6a79 (patch)
treea29fa59302402ae7919e6735623f538602e674ce /lib/kolab_client_output.php
parent8d4fa065d57b9b90a7f413261ab537b516a9b40b (diff)
downloadwebadmin-9a8393c317aae712c52a0d11d69ac35a685e6a79.tar.gz
Use fallback locations for the location of the Smarty 3 class file(s)
Diffstat (limited to 'lib/kolab_client_output.php')
-rw-r--r--lib/kolab_client_output.php13
1 files changed, 12 insertions, 1 deletions
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;