} else {
$href = $page->getHRef();
if ($redirect) {
- $currentUri = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri();
- if (strpos($currentUri, '?') !== false) {
- $currentUri = strstr($currentUri, '?', true);
- }
+ $currentUri = $this->view->url();
$href = $this->view->addParamToUrl($href, 'redirect', $currentUri, true);
}
$link = $this->view->anchor($href, $text, array('class' => 'footer-anchor'));
{
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'));
}
}