]> dev.renevier.net Git - syj.git/blobdiff - application/views/helpers/FooterLink.php
update copyright headers
[syj.git] / application / views / helpers / FooterLink.php
index 50a2f0b8abde8b2accf8c8db030fc9503a20a181..1e9365b6e3115346706fb0b4f2de865d2c9f3060 100644 (file)
@@ -1,17 +1,17 @@
 <?php
-/*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
+/*  This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
     and is published under the AGPL license. */
 
 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 = $this->view->UriPath(true);
                 $href = $this->view->addParamToUrl($href, 'redirect', $currentUri, true);
             }
             $link = $this->view->anchor($href, $text, array('class' => 'footer-anchor'));
@@ -20,7 +20,7 @@ class Syj_View_Helper_FooterLink extends Zend_View_Helper_Abstract
         if (isset($extraclass)) {
             $class = "$class $extraclass";
         }
-        return '<div class="' . $class . '">' . $link . '</div>' . PHP_EOL;
+        return '<div class="' . $class . '">' . $link . $extratext . '</div>' . PHP_EOL;
     }
 }