Skip to content

Commit

Permalink
Merge pull request #12 from midahp/horde_FRAMEWORK_6_0
Browse files Browse the repository at this point in the history
fix smartmobile link generation
  • Loading branch information
ralflang authored Mar 28, 2024
2 parents 37dcb14 + 3db9e0a commit 24f4306
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/Horde/Core/Smartmobile/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ public function toString($raw = false, $full = true)
{
if ($this->toStringCallback || !strlen($this->anchor)) {
$baseUrl = $this->_baseUrl->copy();
$baseUrl->parameters = array_merge($baseUrl->parameters,
$this->parameters);
$baseUrl->parameters = array_merge(
$baseUrl->parameters,
$this->parameters
);
if (strlen($this->pathInfo)) {
$baseUrl->pathInfo = $this->pathInfo;
}
Expand All @@ -98,8 +100,8 @@ public function toString($raw = false, $full = true)
$url .= '#' . ($raw ? $this->anchor : rawurlencode($this->anchor));
}

if ($params = $this->_getParameters()) {
$url .= '?' . implode($raw ? '&' : '&', $params);
if ($params = $this->parameters) {
$url .= '?' . http_build_query($params, '', $raw ? '&' : '&');
}

return strval($url);
Expand Down

0 comments on commit 24f4306

Please sign in to comment.