From e6bb4e823a6fb353fb802b6a7bfb8d7ed1cc424a Mon Sep 17 00:00:00 2001
From: quentusrex <quentusrex@ispconfig3>
Date: Thu, 06 Nov 2008 12:35:24 -0500
Subject: [PATCH] Oops. Don't ever disable auth. Bug FS#267 - mail filter not hidden for client
---
interface/lib/app.inc.php | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php
index fc63f02..46a9114 100644
--- a/interface/lib/app.inc.php
+++ b/interface/lib/app.inc.php
@@ -55,7 +55,7 @@
}
//* Start the session
- if($conf["start_session"] == true) {
+ if($this->_conf['start_session'] == true) {
session_start();
//* Initialize session variables
@@ -63,6 +63,8 @@
if(empty($_SESSION['s']['theme'])) $_SESSION['s']['theme'] = $conf['theme'];
if(empty($_SESSION['s']['language'])) $_SESSION['s']['language'] = $conf['language'];
}
+
+ $this->uses('auth');
}
public function uses($classes)
@@ -162,7 +164,7 @@
$this->tpl->setVar('theme', $_SESSION['s']['theme']);
$this->tpl->setVar('phpsessid', session_id());
$this->tpl->setVar('html_content_encoding', $this->_conf['html_content_encoding']);
- if($this->_conf['logo'] != '' && @is_file($this->_conf['logo'])){
+ if(isset($this->_conf['logo']) && $this->_conf['logo'] != '' && @is_file($this->_conf['logo'])){
$this->tpl->setVar('logo', '<img src="'.$this->_conf['logo'].'" border="0" alt="">');
} else {
$this->tpl->setVar('logo', ' ');
@@ -176,6 +178,9 @@
if(isset($_SESSION['s']['user']) && $_SESSION['s']['user']['typ'] == 'admin') {
$this->tpl->setVar('is_admin', 1);
}
+ if(isset($_SESSION['s']['user']) && $this->auth->has_clients($_SESSION['s']['user']['userid'])) {
+ $this->tpl->setVar('is_reseller', 1);
+ }
}
} // end class
--
Gitblit v1.9.1