mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
Remove baseUrl from Qlink helper (was for testing only and broken)
This commit is contained in:
parent
b4e0b2040a
commit
b7b6a08fbf
@ -15,11 +15,6 @@ class Zend_View_Helper_Qlink extends Zend_View_Helper_Abstract
|
|||||||
$attributes = array();
|
$attributes = array();
|
||||||
$baseUrl = null;
|
$baseUrl = null;
|
||||||
foreach ($properties as $key => $val) {
|
foreach ($properties as $key => $val) {
|
||||||
if ($key === 'baseUrl' ) {
|
|
||||||
// $baseUrl = filter_var($val, FILTER_SANITIZE_URL) . '/';
|
|
||||||
$baseUrl = $val; //rawurlencode($val) . '/';
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($key === 'quote') {
|
if ($key === 'quote') {
|
||||||
$quote = $val;
|
$quote = $val;
|
||||||
continue;
|
continue;
|
||||||
@ -50,10 +45,9 @@ class Zend_View_Helper_Qlink extends Zend_View_Helper_Abstract
|
|||||||
} else {
|
} else {
|
||||||
$url = Url::fromPath($urlFormat);
|
$url = Url::fromPath($urlFormat);
|
||||||
}
|
}
|
||||||
$url->setParams($uriParams)->setBaseUrl($baseUrl);
|
$url->setParams($uriParams);
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'<a href="%s"%s>%s</a>',
|
'<a href="%s"%s>%s</a>',
|
||||||
// $this->getFormattedUrl($urlFormat, $uriParams, $baseUrl),
|
|
||||||
$url,
|
$url,
|
||||||
!empty($attributes) ? ' ' . implode(' ', $attributes) : '',
|
!empty($attributes) ? ' ' . implode(' ', $attributes) : '',
|
||||||
$quote
|
$quote
|
||||||
@ -66,24 +60,5 @@ class Zend_View_Helper_Qlink extends Zend_View_Helper_Abstract
|
|||||||
: $htmlContent
|
: $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;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user