]> dev.renevier.net Git - syj.git/blobdiff - application/views/helpers/LogoutLink.php
use url view helper
[syj.git] / application / views / helpers / LogoutLink.php
index d76682e616aeba87cb3f3f83fbb7366e62022d40..ad6c6e45dc972f17d2aba24fefed1beb2c50c37f 100644 (file)
@@ -6,11 +6,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 = implode('/', array_map('urlencode', explode('/', $currentUri)));
         $translatedString = $this->view->translate('logout');
-        $href = $this->view->addParamToUrl('logout', 'redirect', $currentUri, true);
+        $href = $this->view->addParamToUrl('logout', 'redirect', $encodeduri, true);
         return $this->view->anchor($href, $translatedString, array('id' => 'logout', 'class' => 'login-anchor'));
     }
 }