X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fviews%2Fhelpers%2FFooterLink.php;h=0a2a4752a7ad0416ca5ece1aea1fc92ed8b99dc2;hb=627f937d7241dc4b9311759fa446c3738d05f5a9;hp=529221d8a081a1975731532189d9ec142d348b28;hpb=190fd621df4920c56a422c03663874cddaa67d64;p=syj.git diff --git a/application/views/helpers/FooterLink.php b/application/views/helpers/FooterLink.php index 529221d..0a2a475 100644 --- a/application/views/helpers/FooterLink.php +++ b/application/views/helpers/FooterLink.php @@ -4,22 +4,23 @@ class Syj_View_Helper_FooterLink extends Zend_View_Helper_Abstract { - public function FooterLink($routeoptions, $text, $redirect=true) { + 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 = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri(); - if (strpos($currentUri, '?') !== false) { - $currentUri = strstr($currentUri, '?', true); - } + $currentUri = $this->view->UriPath(true); $href = $this->view->addParamToUrl($href, 'redirect', $currentUri, true); } $link = $this->view->anchor($href, $text, array('class' => 'footer-anchor')); } - return '' . PHP_EOL; + $class = "footer-link"; + if (isset($extraclass)) { + $class = "$class $extraclass"; + } + return '
' . $link . $extratext . '
' . PHP_EOL; } }