diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-07-11 17:01:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-11 17:01:33 +0200 |
commit | e25d1cd62b2362e78f250bf580e0c8defe1052b8 (patch) | |
tree | b091c9e01c986e3d37466f5710d0bf5c157bc4d8 /apps/theming | |
parent | 0473ec30ec02b6345b6fe57b7d6fa91de02ae4a6 (diff) | |
parent | eceb0db4d2f7a952d19c61d877426060f09cb2e2 (diff) | |
download | nextcloud-server-e25d1cd62b2362e78f250bf580e0c8defe1052b8.tar.gz nextcloud-server-e25d1cd62b2362e78f250bf580e0c8defe1052b8.zip |
Merge pull request #361 from nextcloud/make-theming-work-with-pretty-urls
Make theming work with pretty URLs
Diffstat (limited to 'apps/theming')
-rw-r--r-- | apps/theming/appinfo/routes.php | 2 | ||||
-rw-r--r-- | apps/theming/lib/controller/themingcontroller.php | 2 | ||||
-rw-r--r-- | apps/theming/tests/lib/controller/ThemingControllerTest.php | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/theming/appinfo/routes.php b/apps/theming/appinfo/routes.php index ac0463e2c26..dcbb0618fa2 100644 --- a/apps/theming/appinfo/routes.php +++ b/apps/theming/appinfo/routes.php @@ -40,7 +40,7 @@ namespace OCA\Theming\AppInfo; ], [ 'name' => 'Theming#getStylesheet', - 'url' => '/styles.css', + 'url' => '/styles', 'verb' => 'GET', ], [ diff --git a/apps/theming/lib/controller/themingcontroller.php b/apps/theming/lib/controller/themingcontroller.php index 995f929b510..a9ac36ca786 100644 --- a/apps/theming/lib/controller/themingcontroller.php +++ b/apps/theming/lib/controller/themingcontroller.php @@ -234,7 +234,7 @@ class ThemingController extends Controller { \OC_Response::setExpiresHeader(gmdate('D, d M Y H:i:s', time() + (60*60*24*45)) . ' GMT'); \OC_Response::enableCaching(); - $response = new Http\DataDownloadResponse($responseCss, 'style.css', 'text/css'); + $response = new Http\DataDownloadResponse($responseCss, 'style', 'text/css'); $response->cacheFor(3600); return $response; } diff --git a/apps/theming/tests/lib/controller/ThemingControllerTest.php b/apps/theming/tests/lib/controller/ThemingControllerTest.php index 7fba27316a2..d08ebce8663 100644 --- a/apps/theming/tests/lib/controller/ThemingControllerTest.php +++ b/apps/theming/tests/lib/controller/ThemingControllerTest.php @@ -323,7 +323,7 @@ class ThemingControllerTest extends TestCase { ->with('theming', 'backgroundMime', '') ->willReturn(''); - $expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header {background-color: #fff}', 'style.css', 'text/css'); + $expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header {background-color: #fff}', 'style', 'text/css'); $expected->cacheFor(3600); @$this->assertEquals($expected, $this->themingController->getStylesheet()); } @@ -356,7 +356,7 @@ class ThemingControllerTest extends TestCase { #header .logo-icon { background-image: url(\'./logo?v=0\'); background-size: 62px 34px; - }', 'style.css', 'text/css'); + }', 'style', 'text/css'); $expected->cacheFor(3600); @$this->assertEquals($expected, $this->themingController->getStylesheet()); } @@ -385,7 +385,7 @@ class ThemingControllerTest extends TestCase { $expected = new Http\DataDownloadResponse('#body-login { background-image: url(\'./loginbackground?v=0\'); - }', 'style.css', 'text/css'); + }', 'style', 'text/css'); $expected->cacheFor(3600); @$this->assertEquals($expected, $this->themingController->getStylesheet()); } @@ -420,7 +420,7 @@ class ThemingControllerTest extends TestCase { background-size: 62px 34px; }#body-login { background-image: url(\'./loginbackground?v=0\'); - }', 'style.css', 'text/css'); + }', 'style', 'text/css'); $expected->cacheFor(3600); @$this->assertEquals($expected, $this->themingController->getStylesheet()); } |