summaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/helper.php b/lib/helper.php
index c2a0d83f6b1..0e549d006a1 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -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;