Merge pull request #474 from FOSSBilling/extra-question-mark

Removed the extra "&" from URLs
This commit is contained in:
Yağızhan authored and GitHub committed 2022-11-19 23:12:43 +03:00
commit 0bf7a33bca
1 file changed
+7 -7
+7 -7
View File
@@ -47,17 +47,17 @@ class Box_Url implements Box\InjectionAwareInterface
public function link($uri = null, $params = array())
{
$uri = trim($uri, '/');
$link =$this->baseUri .'index.php?_url=/' . $uri;
$link = BB_SEF_URLS ? $this->baseUri . $uri : $this->baseUri .'index.php?_url=/' . $uri;
if(BB_SEF_URLS) {
$link = $this->baseUri . $uri;
if (!empty($params)){
$link .= '?';
$link .= '?' . http_build_query($params);
}
} else {
if (!empty($params)){
$link .= '&' . http_build_query($params);
}
}
if(!empty($params)) {
$link .= '&' . http_build_query($params);
}
return $link;
}
@@ -68,4 +68,4 @@ class Box_Url implements Box\InjectionAwareInterface
$uri = $prefix . '/' . $uri;
return $this->link($uri, $params);
}
}
}