Merge pull request #8391 from owncloud/router-parameter-sorting

Preserve keys when sorting parameters when generatings urls
This commit is contained in:
Thomas Müller 2014-04-30 15:10:36 +02:00
commit 11404b2b12

View file

@ -31,7 +31,7 @@ class CachingRouter extends Router {
* @return string
*/
public function generate($name, $parameters = array(), $absolute = false) {
sort($parameters);
asort($parameters);
$key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . json_encode($parameters) . intval($absolute);
if ($this->cache->hasKey($key)) {
return $this->cache->get($key);