From e3b25d99b473284c6a0cf3b1cf1784b9d311525a Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mon, 14 Feb 2011 18:32:36 +0000 Subject: [PATCH] smarty.inc.php: - use correct variable name instead of $smarty in __construct() - everything else in this commit: whitespace changes git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@964 a1433add-5e2c-0410-b055-b7f2511e0802 --- smarty.inc.php | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/smarty.inc.php b/smarty.inc.php index a78ecb91..ce77ff01 100644 --- a/smarty.inc.php +++ b/smarty.inc.php @@ -9,11 +9,11 @@ class PFASmarty { public function __construct() { $this->template = new Smarty(); - //$smarty->debugging = true; + //$this->template->debugging = true; $incpath = dirname(__FILE__); - $smarty->template_dir = $incpath.'/templates'; - $smarty->compile_dir = $incpath.'/templates_c'; - $smarty->config_dir = $incpath.'/'.$smarty->config_dir; + $this->template->template_dir = $incpath.'/templates'; + $this->template->compile_dir = $incpath.'/templates_c'; + $this->template->config_dir = $incpath.'/'.$this->template->config_dir; } public function assign($key, $value, $sanitise = true) { @@ -63,12 +63,9 @@ $smarty->assign ('version', $version); $smarty->assign ('boolconf_alias_domain', boolconf('alias_domain')); $smarty->assign ('authentication_has_role', array ('global_admin' => authentication_has_role ('global-admin'), 'admin' => authentication_has_role ('admin'), 'user' => authentication_has_role ('user'))); -if (authentication_has_role('global-admin')) -{ +if (authentication_has_role('global-admin')) { $motd_file = "motd-admin.txt"; -} -else -{ +} else { $motd_file = "motd.txt"; } $smarty->assign('motd_file', ''); @@ -76,11 +73,9 @@ if (file_exists ($CONF ['postfix_admin_path'].'/templates/'.$motd_file)) { $smarty->assign ('motd_file', $motd_file); } -function select_options($aValues, $aSelected) -{ +function select_options($aValues, $aSelected) { $ret_val = ''; - foreach ($aValues as $val) - { + foreach ($aValues as $val) { $ret_val .= '