summaryrefslogtreecommitdiff
path: root/manager/library/plugins/plugin.loginlogout.php
diff options
context:
space:
mode:
Diffstat (limited to 'manager/library/plugins/plugin.loginlogout.php')
-rw-r--r--manager/library/plugins/plugin.loginlogout.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/manager/library/plugins/plugin.loginlogout.php b/manager/library/plugins/plugin.loginlogout.php
index 75885d6..1077ef2 100644
--- a/manager/library/plugins/plugin.loginlogout.php
+++ b/manager/library/plugins/plugin.loginlogout.php
@@ -7,25 +7,25 @@
* $Id: plugin.loginlogout.php 95 2010-03-19 14:14:39Z markus $
*/
class LoginLogout extends Zend_Controller_Plugin_Abstract {
- public function postDispatch(Zend_Controller_Request_Abstract $request) {
- $session = Zend_Registry::get('session');
- if (!isset($session->authdata) || !isset($session->authdata['authed']) || $session->authdata['authed'] === false) {
- $controller = 'login';
- $text = 'Login';
- }
- else {
- $controller = 'logout';
- $text = 'Logout';
- }
- $cur_ctrl = $request->getControllerName();
- if ($cur_ctrl == 'login')
- $aclass=' class="active"';
- else
- $aclass='';
+ public function postDispatch(Zend_Controller_Request_Abstract $request) {
+ $session = Zend_Registry::get('session');
+ if (!isset($session->authdata) || !isset($session->authdata['authed']) || $session->authdata['authed'] === false) {
+ $controller = 'login';
+ $text = 'Login';
+ }
+ else {
+ $controller = 'logout';
+ $text = 'Logout';
+ }
+ $cur_ctrl = $request->getControllerName();
+ if ($cur_ctrl == 'login')
+ $aclass=' class="active"';
+ else
+ $aclass='';
- $view = Zend_Registry::get('view');
- $view->topNav('<a href="' .
- $view->url(array('controller' => $controller), 'default', true) .
- '"' . $aclass . '>' . I18n::_($text) . '</a>', Zend_View_Helper_Placeholder_Container_Abstract::SET, 1000);
- }
+ $view = Zend_Registry::get('view');
+ $view->topNav('<a href="' .
+ $view->url(array('controller' => $controller), 'default', true) .
+ '"' . $aclass . '>' . I18n::_($text) . '</a>', Zend_View_Helper_Placeholder_Container_Abstract::SET, 1000);
+ }
}