Merge pull request #370 from nextcloud/stable9-backport-361

[Stable9] Make theming work with pretty URLs
This commit is contained in:
Marius Blüm 2016-07-12 06:59:42 +02:00 committed by GitHub
commit d35d9d246e
3 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ namespace OCA\Theming\AppInfo;
],
[
'name' => 'Theming#getStylesheet',
'url' => '/styles.css',
'url' => '/styles',
'verb' => 'GET',
],
[

View File

@ -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;
}

View File

@ -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());
}