mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Simplify the code and remove a first unnecessary (and non conform) '&' character when there are pending arguments
This commit is contained in:
parent
73522fe189
commit
9f5847b739
1 changed files with 2 additions and 5 deletions
|
|
@ -78,11 +78,8 @@ class OC_Helper {
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($args)) {
|
||||
$urlLinkTo .= '?';
|
||||
foreach($args as $k => $v) {
|
||||
$urlLinkTo .= '&'.$k.'='.urlencode($v);
|
||||
}
|
||||
if ($args && $query = http_build_query($args, '', '&')) {
|
||||
$urlLinkTo .= '?'.$query;
|
||||
}
|
||||
|
||||
return $urlLinkTo;
|
||||
|
|
|
|||
Loading…
Reference in a new issue