]> dev.renevier.net Git - syj.git/blobdiff - application/views/helpers/LogoutLink.php
store lang preference in session instead of url
[syj.git] / application / views / helpers / LogoutLink.php
index d76682e616aeba87cb3f3f83fbb7366e62022d40..307c55cd6baf2aaa5be806ed3aaf97107315d477 100644 (file)
@@ -5,12 +5,9 @@
 class Syj_View_Helper_LogoutLink extends Zend_View_Helper_Abstract
 {
     public function logoutLink() {
-        $currentUri = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri();
-        if (strpos($currentUri, '?') !== false) {
-            $currentUri = strstr($currentUri, '?', true);
-        }
+        $encodeduri = $this->view->UriPath(true);
         $translatedString = $this->view->translate('logout');
-        $href = $this->view->addParamToUrl('logout', 'redirect', $currentUri, true);
-        return $this->view->anchor($href, $translatedString, array('id' => 'logout', 'class' => 'login-anchor'));
+        $href = $this->view->addParamToUrl('logout', 'redirect', $encodeduri, true);
+        return $this->view->anchor($href, $translatedString, array('id' => 'logout', 'class' => 'menu-item'));
     }
 }