From 01852447102cc78228a74cf9e85e0bed37322103 Mon Sep 17 00:00:00 2001 From: Sam Georges Date: Fri, 16 May 2014 14:29:02 +1000 Subject: [PATCH] Drop the file extension from the combiner URL This causes too many issues with Nginx and php server instances. --- .htaccess | 6 ------ modules/cms/classes/CombineAssets.php | 6 +++--- modules/cms/classes/Controller.php | 1 + 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.htaccess b/.htaccess index c783fea3b..6ac6d0e2e 100644 --- a/.htaccess +++ b/.htaccess @@ -11,12 +11,6 @@ ## # RewriteBase / - ## - ## Handle resource requests - ## - RewriteCond %{REQUEST_URI} combine/.*(.css|.js) - RewriteRule ^ index.php [L] - ## ## Black list protected files ## diff --git a/modules/cms/classes/CombineAssets.php b/modules/cms/classes/CombineAssets.php index f22d0523b..383062c34 100644 --- a/modules/cms/classes/CombineAssets.php +++ b/modules/cms/classes/CombineAssets.php @@ -171,10 +171,10 @@ class CombineAssets $version = $combiner->getLastModified(); $cacheInfo = [ - 'output' => $cacheId.'-'.$version.'.'.$extension, + 'output' => $cacheId.'-'.$version, 'version' => $version, - 'files' => $assets, - 'path' => $this->path + 'files' => $assets, + 'path' => $this->path ]; $this->putCache($cacheId, $cacheInfo); diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index d6418f076..b201ca361 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -632,6 +632,7 @@ class Controller extends BaseController /** * Combines JavaScript and StyleSheet assets. + * @param string $name Combined file code * @return string Combined content. */ public function combine($name)