diff options
author | Andreas Fischer <bantu@owncloud.com> | 2014-04-20 18:27:23 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2014-04-20 18:27:23 +0200 |
commit | f2f5a53d3617f04082f3facb968e514abdd20ee3 (patch) | |
tree | 8b0617609b4c516df5b44c8b52fba20dadf2c5cf /lib/private/route | |
parent | f2e5494edcbc426b38eaf8d5ecc38a780fda0aca (diff) | |
parent | 7f77b08098426801bfede696a88671efc1f82d83 (diff) | |
download | nextcloud-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.php | 3 |
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 { |