From b7b6a08fbfa9038f252b99ea1fee2e563c579f06 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 7 Mar 2014 16:22:13 +0000 Subject: [PATCH] Remove baseUrl from Qlink helper (was for testing only and broken) --- application/views/helpers/Qlink.php | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/application/views/helpers/Qlink.php b/application/views/helpers/Qlink.php index d84ccfed0..5e7d8f567 100644 --- a/application/views/helpers/Qlink.php +++ b/application/views/helpers/Qlink.php @@ -15,11 +15,6 @@ class Zend_View_Helper_Qlink extends Zend_View_Helper_Abstract $attributes = array(); $baseUrl = null; foreach ($properties as $key => $val) { - if ($key === 'baseUrl' ) { - // $baseUrl = filter_var($val, FILTER_SANITIZE_URL) . '/'; - $baseUrl = $val; //rawurlencode($val) . '/'; - continue; - } if ($key === 'quote') { $quote = $val; continue; @@ -50,10 +45,9 @@ class Zend_View_Helper_Qlink extends Zend_View_Helper_Abstract } else { $url = Url::fromPath($urlFormat); } - $url->setParams($uriParams)->setBaseUrl($baseUrl); + $url->setParams($uriParams); return sprintf( '%s', -// $this->getFormattedUrl($urlFormat, $uriParams, $baseUrl), $url, !empty($attributes) ? ' ' . implode(' ', $attributes) : '', $quote @@ -66,24 +60,5 @@ class Zend_View_Helper_Qlink extends Zend_View_Helper_Abstract : $htmlContent ); } -/* - public function getFormattedUrl($urlFormat, $uriParams, $baseUrl = null) - { - $params = $args = array(); - foreach ($uriParams as $name => $value) { - if (is_int($name)) { - $params[] = rawurlencode($value); - } else { - $args[] = rawurlencode($name) . '=' . rawurlencode($value); - } - } - $url = $urlFormat; - $url = vsprintf($url, $params); - if (! empty($args)) { - $url .= '?' . implode('&', $args); - } - return is_null($baseUrl) ? $this->view->baseUrl($url) : $baseUrl.$url; - } -*/ }