Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSFReader <TheSFReader@gmail.com>2013-01-25 20:02:44 +0400
committerTheSFReader <TheSFReader@gmail.com>2013-01-25 20:02:44 +0400
commit9f5847b739c20a0b2de3672459445f08300ef790 (patch)
treeb3b328f706be83c54fae7a2bdef89942cc00f1e6 /lib/helper.php
parent73522fe189253481984019cdb9f141cbaa41997c (diff)
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.php7
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;