summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2010-09-13 10:01:47 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2010-09-13 10:01:47 (GMT)
commitd792ed29c7fe23e28d8c53fe72a66765744cb13b (patch)
tree1159ac79cc205ca5e6d34750e4ed50b738810d36
parentc45006534c43af76ea2f6ef7a22c910e931ac0ad (diff)
downloadkolab-webadmin-d792ed29c7fe23e28d8c53fe72a66765744cb13b.tar.gz
Move the smarty handling into the config file. Having a configuration based inclusion path is still bad but smarty still seems to have different install paths on the different distributions.
-rw-r--r--Makefile.am10
-rw-r--r--php/admin/include/mysmarty.php (renamed from php/admin/include/mysmarty.php.in)7
2 files changed, 6 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am
index c25bd76..ec47bc7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -109,13 +109,13 @@ PHP_INCLUDES = php/admin/include/menu.php \
php/admin/include/form.class.php \
php/admin/include/ldap.class.php \
php/admin/include/locale.php \
+ php/admin/include/mysmarty.php \
php/admin/include/Sieve.php \
php/admin/include/passwd.php
phpincludesdir = $(phpkolabdir)/include
phpincludes_DATA = $(PHP_INCLUDES) \
- php/admin/include/headers.php \
- php/admin/include/mysmarty.php
+ php/admin/include/headers.php
EXTRA_DIST += $(PHP_INCLUDES)
PEARKA_FILES = lib/KolabAdmin/Ldap.php \
@@ -385,12 +385,6 @@ php/admin/include/headers.php: php/admin/include/headers.php.in
CLEANFILES += php/admin/include/headers.php
EXTRA_DIST += php/admin/include/headers.php.in
-php/admin/include/mysmarty.php: php/admin/include/mysmarty.php.in
- @$(mkinstalldirs) php/admin/include
- $(do_subst) <$(srcdir)/php/admin/include/mysmarty.php.in >$@
-CLEANFILES += php/admin/include/mysmarty.php
-EXTRA_DIST += php/admin/include/mysmarty.php.in
-
php/admin/templates/page.tpl: php/admin/templates/page.tpl.in
@$(mkinstalldirs) php/admin/templates
$(do_subst) <$(srcdir)/php/admin/templates/page.tpl.in >$@
diff --git a/php/admin/include/mysmarty.php.in b/php/admin/include/mysmarty.php
index 9762af8..0e27fa5 100644
--- a/php/admin/include/mysmarty.php.in
+++ b/php/admin/include/mysmarty.php
@@ -19,7 +19,6 @@
*/
require_once('config.php');
-require_once('@kolab_php_smarty_prefix@/Smarty.class.php');
require_once('locale.php');
// PENDING: Remove this before production(!)
@@ -32,12 +31,14 @@ class MySmarty extends Smarty {
global $topdir;
global $php_dir;
global $language;
+ global $basedir;
+ global $smarty_compiledir;
$this->Smarty();
- $basedir = "$php_dir/@kolab_php_module_prefix@admin/";
$this->config_dir = $basedir.'configs/';
$this->template_dir = $basedir.'templates/';
- $this->compile_dir = '@smarty_compiledir@/';
+ $this->compile_dir = $smarty_compiledir;
+
//$this->cache_dir = $basedir.'cache/';
// Added for i18n management (Romain 05-03-03)
$this->register_function("tr", "translate");