X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fviews%2Fhelpers%2FFooterLink.php;h=cebae509b396d2fb277749d89d6391423ae56365;hb=c1aeb7538786d8c9f3b3337c0b71e21ef89d9c77;hp=50a2f0b8abde8b2accf8c8db030fc9503a20a181;hpb=3c439d97a293838053975b3db0899b79abe6ca16;p=syj.git diff --git a/application/views/helpers/FooterLink.php b/application/views/helpers/FooterLink.php index 50a2f0b..cebae50 100644 --- a/application/views/helpers/FooterLink.php +++ b/application/views/helpers/FooterLink.php @@ -4,14 +4,17 @@ class Syj_View_Helper_FooterLink extends Zend_View_Helper_Abstract { - public function FooterLink($routeoptions, $text, $redirect=true, $extraclass=null) { + public function FooterLink($routeoptions, $text, $redirect=true, $extraclass=null, $extratext="") { $page = new Zend_Navigation_Page_Mvc($routeoptions); if ($page->isActive()) { $link = $this->view->escape($text); } else { $href = $page->getHRef(); if ($redirect) { - $currentUri = $this->view->url(); + $currentUri = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri(); + if (($pos = strpos($currentUri, '?')) !== false) { + $currentUri = substr($currentUri, 0, $pos); + } $href = $this->view->addParamToUrl($href, 'redirect', $currentUri, true); } $link = $this->view->anchor($href, $text, array('class' => 'footer-anchor')); @@ -20,7 +23,7 @@ class Syj_View_Helper_FooterLink extends Zend_View_Helper_Abstract if (isset($extraclass)) { $class = "$class $extraclass"; } - return '
' . $link . '
' . PHP_EOL; + return '
' . $link . $extratext . '
' . PHP_EOL; } }