diff options
author | TheSFReader <TheSFReader@gmail.com> | 2013-01-25 17:02:44 +0100 |
---|---|---|
committer | TheSFReader <TheSFReader@gmail.com> | 2013-01-25 17:02:44 +0100 |
commit | 9f5847b739c20a0b2de3672459445f08300ef790 (patch) | |
tree | b3b328f706be83c54fae7a2bdef89942cc00f1e6 /lib/helper.php | |
parent | 73522fe189253481984019cdb9f141cbaa41997c (diff) | |
download | nextcloud-server-9f5847b739c20a0b2de3672459445f08300ef790.tar.gz nextcloud-server-9f5847b739c20a0b2de3672459445f08300ef790.zip |
Simplify the code and remove a first unnecessary (and non conform) '&' character when there are pending arguments
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/helper.php b/lib/helper.php index 5d7e3fa4894..540a7dceb3e 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; |