summaryrefslogtreecommitdiffstats
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:53 +0200
commit19616b7d463e9107e9f4f13b4742abae67f19eac (patch)
treee3e726eaa54a3edab4262aab43253f58dc94944e
parent0589aba9ee53d8135a26d722b6a2b74c32812e5d (diff)
downloadwebadmin-19616b7d463e9107e9f4f13b4742abae67f19eac.tar.gz
Use fallback locations for the location of the Smarty 3 class file(s)
-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;