aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/route
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2014-04-20 18:27:23 +0200
committerAndreas Fischer <bantu@owncloud.com>2014-04-20 18:27:23 +0200
commitf2f5a53d3617f04082f3facb968e514abdd20ee3 (patch)
tree8b0617609b4c516df5b44c8b52fba20dadf2c5cf /lib/private/route
parentf2e5494edcbc426b38eaf8d5ecc38a780fda0aca (diff)
parent7f77b08098426801bfede696a88671efc1f82d83 (diff)
downloadnextcloud-server-f2f5a53d3617f04082f3facb968e514abdd20ee3.tar.gz
nextcloud-server-f2f5a53d3617f04082f3facb968e514abdd20ee3.zip
Merge pull request #7988 from owncloud/routing-cache-webroot
Keep cached urls with different hostnames or baseurls seperate * owncloud/routing-cache-webroot: Sort parameters and cast to int add delimiter between host and baseurl Keep cached urls with different hostnames or baseurls seperate
Diffstat (limited to 'lib/private/route')
-rw-r--r--lib/private/route/cachingrouter.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/route/cachingrouter.php b/lib/private/route/cachingrouter.php
index ad25372391f..6412ceb0418 100644
--- a/lib/private/route/cachingrouter.php
+++ b/lib/private/route/cachingrouter.php
@@ -31,7 +31,8 @@ class CachingRouter extends Router {
* @return string
*/
public function generate($name, $parameters = array(), $absolute = false) {
- $key = $name . json_encode($parameters) . $absolute;
+ sort($parameters);
+ $key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . json_encode($parameters) . intval($absolute);
if ($this->cache->hasKey($key)) {
return $this->cache->get($key);
} else {