From a54a10dbe02674ed602210b6527ba29bb0bdc9ae Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 May 2013 16:42:51 +0200 Subject: [PATCH] do not use session function if session not set There is no session on the login page. So don't try to call functions from the session. Also set a different color of the header menu if a user switch has been done --- views/bootstrap/class.Bootstrap.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index f6d5f77a6..93d6bc9bd 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -51,10 +51,21 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common { echo ''."\n"; echo ''."\n"; + if($this->params['session'] && $this->params['session']->getSu()) { +?> + +".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS").(strlen($title)>0 ? ": " : "").htmlspecialchars($title)."\n"; echo "\n"; echo "0 ? " class=\"".$bodyClass."\"" : "").">\n"; - if($flashmsg = $this->params['session']->getSplashMsg()) { + if($this->params['session'] && $flashmsg = $this->params['session']->getSplashMsg()) { $this->params['session']->clearSplashMsg(); ?>