Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make theming work with pretty URLs #361

Merged
merged 2 commits into from
Jul 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/theming/appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
[
'name' => 'Theming#getStylesheet',
'url' => '/styles.css',
'url' => '/styles',
'verb' => 'GET',
],
[
Expand Down
2 changes: 1 addition & 1 deletion apps/theming/lib/controller/themingcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function getStylesheet() {

\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;
}
Expand Down
8 changes: 4 additions & 4 deletions apps/theming/tests/lib/controller/ThemingControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public function testGetStylesheetWithOnlyColor() {
->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());
}
Expand Down Expand Up @@ -356,7 +356,7 @@ public function testGetStylesheetWithOnlyHeaderLogo() {
#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());
}
Expand Down Expand Up @@ -385,7 +385,7 @@ public function testGetStylesheetWithOnlyBackgroundLogin() {

$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());
}
Expand Down Expand Up @@ -420,7 +420,7 @@ public function testGetStylesheetWithAllCombined() {
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());
}
Expand Down