diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-01-30 02:37:11 -0800 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-01-30 02:37:11 -0800 |
commit | a6040d0cc77aa1888637429402d4387b7fb616da (patch) | |
tree | f445b8c68c9d9c9f5e4887f9883e2a2f0cf9c569 | |
parent | 8fd263ef63ad122211eca90567a741c7e18d51f2 (diff) | |
parent | 9c7a18044d9d53161a157bcdd1d394d6d75f42da (diff) | |
download | nextcloud-server-a6040d0cc77aa1888637429402d4387b7fb616da.tar.gz nextcloud-server-a6040d0cc77aa1888637429402d4387b7fb616da.zip |
Merge pull request #1308 from TheSFReader/master
Changed the linkTo function (from Helper class) to get rid of an unnecessary (and potentially non conform) leading '&' character when adding arguments
-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 d2c6b1695bd..425dc138c5a 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; |