openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit e34a0ad5add0ef7f5575fafc3b8541221888ca32
parent aa3223eab6c632fc5a8789f4db8463f31a0858a2
Author: Jan Dankert <devnull@localhost>
Date:   Mon, 29 Oct 2012 22:27:38 +0100

Benutzerstyle nach Login benutzen und nach Logout wieder Default-Style.

Diffstat:
Maction/IndexAction.class.php | 10++++++++++
Maction/LoginAction.class.php | 1+
Mthemes/default/layout/index.php | 2+-
3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/action/IndexAction.class.php b/action/IndexAction.class.php @@ -35,6 +35,16 @@ class IndexAction extends Action public function showView() { + global $conf; + + $user = Session::getUser(); + if ( is_object($user) ) + $style = $user->style; + else + $style = 'default'; + + + require('themes/default/layout/index.php'); exit; } diff --git a/action/LoginAction.class.php b/action/LoginAction.class.php @@ -960,6 +960,7 @@ class LoginAction extends Action else { Session::set('perspective','login'); + $this->setStyle('default'); $this->refresh(); } } diff --git a/themes/default/layout/index.php b/themes/default/layout/index.php @@ -23,7 +23,7 @@ ?> <link rel="<?php echo $meta['name'] ?>" href="<?php echo $meta['url'] ?>" title="<?php echo $meta['title'] ?>" ><?php } ?> - <link id="userstyle" rel="stylesheet" type="text/css" href="<?php echo css_link() ?>" > + <link id="userstyle" rel="stylesheet" type="text/css" href="<?php echo css_link($style) ?>" > <link rel="stylesheet" type="text/css" href="<?php echo OR_THEMES_EXT_DIR ?>../editor/markitup/markitup/skins/markitup/style.css" /> <link rel="stylesheet" type="text/css" href="<?php echo OR_THEMES_EXT_DIR ?>../editor/markitup/markitup/sets/default/style.css" />