Merge tag '4.2.0' into 4.2

Release 4.2.0
This commit is contained in:
Daniel Hensby 2018-07-30 11:04:57 +01:00
commit ec5640cbd9
No known key found for this signature in database
GPG Key ID: D8DEBC4C8E7BC8B9
11 changed files with 604 additions and 32 deletions

View File

@ -8,7 +8,7 @@ summary: Set the correct HTTP cache headers for your responses.
By default, SilverStripe sends headers which signal to HTTP caches
that the response should be not considered cacheable.
HTTP caches can either be intermediary caches (e.g. CDNs and proxies), or clients (e.g. browsers).
The cache headers sent are `Cache-Control: no-store, no-cache, must-revalidate`;
The cache headers sent are `Cache-Control: no-cache, must-revalidate`;
HTTP caching can be a great way to speed up your website, but needs to be properly applied.
Getting it wrong can accidentally expose draft pages or other protected content.
@ -59,8 +59,8 @@ Does not set `private` directive, use `privateCache()` if this is explicitly req
Simple way to set cache control header to a cacheable state.
Use this method over `publicCache()` if you are unsure about caching details.
Removes `no-store` and `no-cache` directives; other directives will remain in place.
Use alongside `setMaxAge()` to indicate caching.
Removes the `no-store` directive unless a `max-age` is set; other directives will remain in place.
Use alongside `setMaxAge()` to activate caching.
Does not set `public` directive. Usually, `setMaxAge()` is sufficient. Use `publicCache()` if this is explicitly required
([details](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching#public_vs_private))
@ -184,24 +184,13 @@ class PageController extends ContentController
}
```
## Defaults
By default, PHP adds caching headers that make the page appear purely dynamic. This isn't usually appropriate for most
sites, even ones that are updated reasonably frequently. SilverStripe overrides the default settings with the following
headers:
* The `Last-Modified` date is set to be most recent modification date of any database record queried in the generation
of the page.
* The `Expiry` date is set by taking the age of the page and adding that to the current time.
* `Cache-Control` is set to `max-age=86400, must-revalidate`
* Since a visitor cookie is set, the site won't be cached by proxies.
* Ajax requests are never cached.
## Max Age
The cache age determines the lifetime of your cache, in seconds.
It only takes effect if you instruct the cache control
that your response is cacheable in the first place (via `enableCache()` or via modifying the `HTTP.cache_control` defaults).
that your response is cacheable in the first place
(via `enableCache()`, `publicCache()` or `privateCache()`),
or via modifying the `HTTP.cache_control` defaults).
```php
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
@ -209,7 +198,8 @@ HTTPCacheControlMiddleware::singleton()
->setMaxAge(60)
```
Note that `setMaxAge(0)` is NOT sufficient to disable caching in all cases.
Note that `setMaxAge(0)` is NOT sufficient to disable caching in all cases,
use `disableCache()` instead.
### Last Modified
@ -228,7 +218,7 @@ when calculating a cache key, usually in addition to the full URL.
By default, SilverStripe will output a `Vary` header with the following content:
```
Vary: X-Requested-With, X-Forwarded-Protocol
Vary: X-Forwarded-Protocol
```
To change the value of the `Vary` header, you can change this value by specifying the header in configuration.
@ -237,3 +227,6 @@ To change the value of the `Vary` header, you can change this value by specifyin
SilverStripe\Control\HTTP:
vary: ""
```
Note that if you use `Director::is_ajax()` on cached pages
then you should add `X-Requested-With` to the vary header.

View File

@ -357,6 +357,9 @@ class PageController extends ContentController
Note this is different from `Vary: Accept-Encoding`,
which is important for compression (e.g. gzip), and usually added by
other layers such as Apache's mod_gzip.
* Removed `Vary: X-Requested-With` since it's only applicable when varying
content based on the client context, mostly for returning different XHR responses
as determined through `Director::is_ajax()`.
* No longer sets `Last-Modified` date in HTTP response headers in `DataObject::__construct()`.
Uses `ETag` calculation based on response body which is more accurate,
and resilient against partial and object caching which can produce stale `Last-Modified` values.
@ -367,4 +370,197 @@ class PageController extends ContentController
* Deprecated `HTTP.disable_http_cache`. Use `HTTPCacheControlMiddleware.defaultState` and `defaultForcingLevel` instead
* Deprecated `HTTP::register_modification_date()`. Use `HTTPCacheControlMiddleware::registerModificationDate()` instead
* Deprecated `HTTP::register_modification_timestamp()`. Use `HTTPCacheControlMiddleware::registerModificationDate()` instead
* Deprecated `HTTP::register_etag()`. Use `HTTPCacheControlMiddleware::ETagMiddleware()` instead
* Deprecated `HTTP::register_etag()`. Use `HTTPCacheControlMiddleware::ETagMiddleware()` instead<!--- Changes below this line will be automatically regenerated -->
## Change Log
### Security
* 2018-04-23 [d42bd6e](https://github.com/silverstripe/silverstripe-assets/commit/d42bd6ec3e1d15d48074de04bcabfd90ce0cbdc9) File.allowed_extensions can have values removed via YAML configuration (Robbie Averill) - See [ss-2018-014](https://www.silverstripe.org/download/security-releases/ss-2018-014)
* 2018-04-23 [30e2d9c](https://github.com/silverstripe/silverstripe-framework/commit/30e2d9c4df0e8d431bdf41446c7dc4d5e74ad507) Allow forced redirects to HTTPS for responses with basic authentication (Robbie Averill) - See [ss-2018-009](https://www.silverstripe.org/download/security-releases/ss-2018-009)
* 2018-04-10 [0b7e665](https://github.com/silverstripe/silverstripe-asset-admin/commit/0b7e665266c08fb0262af15096c0eaa2ce872a00) Enable oembed to be disabled serverside (Damian Mooyman) - See [ss-2018-003](https://www.silverstripe.org/download/security-releases/ss-2018-003)
* 2018-04-10 [7c2886d](https://github.com/silverstripe/silverstripe-framework/commit/7c2886d87cd8dc01181b69f5252a7012137668f9) Update docs for oembed (Damian Mooyman) - See [ss-2018-003](https://www.silverstripe.org/download/security-releases/ss-2018-003)
* 2018-04-09 [326b1ff](https://github.com/silverstripe/silverstripe-asset-admin/commit/326b1ffa3976d8be30de3f8cfc0e7a55c14764aa) Implement stronger oembed white/blacklist (Damian Mooyman) - See [ss-2018-002](https://www.silverstripe.org/download/security-releases/ss-2018-002)
### API Changes
* 2018-06-15 [53dded8](https://github.com/silverstripe/silverstripe-framework/commit/53dded8cff678c6fee4163f91ceac12b6c960a77) Remove @internal from new 4.2 methods (Damian Mooyman)
* 2018-06-12 [ec956a6](https://github.com/silverstripe/silverstripe-framework/commit/ec956a682dce2876322a3bc7c169a8eccec558ec) Moving tests to use transactions (Daniel Hensby)
* 2018-04-16 [b1e8db1](https://github.com/silverstripe/silverstripe-versioned/commit/b1e8db1848c410abfd917d2b7104221d5004b66c) Implement rollbackRecursive() / rollbackSingle() (Damian Mooyman)
* 2018-04-16 [c8b3593](https://github.com/silverstripe/silverstripe-framework/commit/c8b3593090d7543df59c33f1323b9b188e663efd) Form::makeReadonly() returns self (Damian Mooyman)
* 2018-04-06 [6c616f5](https://github.com/silverstripe/silverstripe-cms/commit/6c616f5f7a4d2611e7a8f2cbb66360079c3edb6b) Implement polymorphic sitetree link tracking (#2123) (Damian Mooyman)
* 2018-03-22 [7351caf](https://github.com/silverstripe/silverstripe-framework/commit/7351caf48702558d20a93bd83fdc4c36d4be50c3) Allow non-DataExtension Extensions to decorate dataobject (Damian Mooyman)
* 2018-03-21 [257ff69](https://github.com/silverstripe/silverstripe-framework/commit/257ff69e321e08af743de019ae338a291cb62615) Implement many_many through polymorphic (from only) (#7928) (Damian Mooyman)
* 2018-03-21 [32dcc4d](https://github.com/silverstripe/silverstripe-versioned/commit/32dcc4d34fa3490dfa4b1dd877448673176ca236) add withVersionedMode() to safely isolate reading mode modifications (Damian Mooyman)
* 2018-03-20 [87afe84](https://github.com/silverstripe/silverstripe-graphql/commit/87afe84e86d40ba4e9ebd0c37ea52e806650ba59) Customise type names and operation names (#143) (Aaron Carlino)
* 2018-03-05 [3a1c813](https://github.com/silverstripe/silverstripe-framework/commit/3a1c813b288090853942296d52f12157ae83c946) Add getContentCSS() / setContentCSS() to allow per-config customisation of content_css (Damian Mooyman)
* 2018-02-21 [ced2ba1](https://github.com/silverstripe/silverstripe-framework/commit/ced2ba1f64015c92dfeea6b473cf3f1999e449c6) Move CSV writing/reading to league/csv library (Daniel Hensby)
* 2018-02-07 [860fa2a](https://github.com/silverstripe/silverstripe-framework/commit/860fa2a05a8d55d97a9508858215502e94c24810) Add excludeAny() and tests for complicated excludes/filters (#7838) (Andrew Aitken-Fincham)
### Features and Enhancements
* 2018-06-18 [95bcac7](https://github.com/silverstripe/silverstripe-framework/commit/95bcac796a3bcb65e7d9fc55e0af0b9d17407938) Ensure test DB is flushed on either DDL or transaction-disabled tests (Damian Mooyman)
* 2018-06-13 [a88257e](https://github.com/silverstripe/silverstripe-framework/commit/a88257efac1a222607d413c070ab4bd7dc20df3d) Add version to HTTPRequest and create raw string representation (Daniel Hensby)
* 2018-05-21 [865ebb3](https://github.com/silverstripe/silverstripe-framework/commit/865ebb3398a692d9f39b4f64ff86054ccc291177) Improve upgrading experience. (#8025) (Damian Mooyman)
* 2018-05-20 [1d34d19](https://github.com/silverstripe/silverstripe-admin/commit/1d34d198f8ed661a987c8a10ee24c568e4528e39) Make FormAlert injectable (Robbie Averill)
* 2018-05-17 [e3237f9](https://github.com/silverstripe/silverstripe-cms/commit/e3237f9638d72d49e1e192738e00eacac2308c69) Add revert mutation and refactor injector transformations (#2158) (Robbie Averill)
* 2018-05-17 [8ffa9dd](https://github.com/silverstripe/silverstripe-admin/commit/8ffa9dda6aa53da4f701cf61b32c64b3318053aa) Make Preview component injectable (#505) (Robbie Averill)
* 2018-05-11 [1a57c7c](https://github.com/silverstripe/silverstripe-framework/commit/1a57c7c1d0623fdc1b5a2ba2428306dfaf618bb0) Add getJoinTable to MMTL (Daniel Hensby)
* 2018-05-02 [660e8bd](https://github.com/silverstripe/silverstripe-graphql/commit/660e8bde0e4b80ef770672436ae1c05262c61665) static caching of schema types, as well as dynamic endpoint (Aaron Carlino)
* 2018-05-01 [aae318e](https://github.com/silverstripe/silverstripe-admin/commit/aae318efd7a87b6ebcd57ab0d251095721651400) Register fieldHolder HOCs with injector (Dylan Wagstaff)
* 2018-04-27 [e0b4d50](https://github.com/silverstripe/silverstripe-admin/commit/e0b4d506a1eea6daa8b66f037f2a140b8f76eb1a) Add Loading indicator component, implement into FormBuilderLoader (#490) (Robbie Averill)
* 2018-04-26 [0494be7](https://github.com/silverstripe/silverstripe-admin/commit/0494be71d8f35c7c45e76e4b0110e6a8f948769a) Ensure that popover has correct container assigned (Damian Mooyman)
* 2018-04-23 [1b24bf6](https://github.com/silverstripe/silverstripe-graphql/commit/1b24bf635949fac871ba6180b83986505c0e01db) Consolidate type / operation name generation (#151) (Damian Mooyman)
* 2018-04-23 [f50438e](https://github.com/silverstripe/silverstripe-versioned/commit/f50438e448209372f1f19c4d0c566182758c4a35) Ensure that default caches are segmented based on versioned state (Damian Mooyman)
* 2018-04-19 [7c3980a](https://github.com/silverstripe/silverstripe-graphql/commit/7c3980a1c8dd10f24aabddcc770c102d13a32089) Refactor for more consistent use of union and inheritance types (#150) (Aaron Carlino)
* 2018-04-11 [4ddee82](https://github.com/silverstripe/silverstripe-admin/commit/4ddee82ccd989963581d7bd8168f7d0899571096) Allow Preview class names to be overridden, and add i18n to messages (Robbie Averill)
* 2018-04-11 [c4f8af5](https://github.com/silverstripe/silverstripe-cms/commit/c4f8af543cd362dfc54d477cac956f7418747e50) Add AbsoluteLink to history viewer page GraphQL query (#2142) (Robbie Averill)
* 2018-04-10 [0fa15f4](https://github.com/silverstripe/silverstripe-versioned/commit/0fa15f45e8c19f0c2c560597bdff1a61d93c6660) Ensure invalid stage values are throws as exceptions (Damian Mooyman)
* 2018-04-09 [19e45a9](https://github.com/silverstripe/silverstripe-asset-admin/commit/19e45a9b966490be55b79c2667e2e18c16c3e0e6) Open modal default upload folder (#763) (Maxime Rainville)
* 2018-04-04 [2c266c2](https://github.com/silverstripe/silverstripe-versioned/commit/2c266c220918c93fd45ad7ecb23d153bb529821e) Allow cleanupVersionedOrphans to be disabled (Damian Mooyman)
* 2018-04-03 [47bcac9](https://github.com/silverstripe/silverstripe-framework/commit/47bcac930df8bde71ffeb9144ac07d429ea9ee87) Add config var to skip confirm logout (#7977) (Andrew Aitken-Fincham)
* 2018-04-02 [14af3b8](https://github.com/silverstripe/silverstripe-admin/commit/14af3b851906c04211f1a72de27e0a939e1b3656) Add --inverted modifier for Badge component with pattern library examples (Robbie Averill)
* 2018-03-21 [d88415b](https://github.com/silverstripe/silverstripe-versioned/commit/d88415b57d3042935eb4e08f46e51a6b0d9b802b) Decorate TestSession with stage params (Damian Mooyman)
* 2018-03-21 [26402f3](https://github.com/silverstripe/silverstripe-framework/commit/26402f3bb52b2effa4218ada4b06ce9199216190) Enable request handlers to be extended (Damian Mooyman)
* 2018-03-21 [9a6d18a](https://github.com/silverstripe/silverstripe-admin/commit/9a6d18a8e456ca45d050d6b5306f4aa2a9e66ad1) Set default reading mode in admin (disables stage=Stage rewrite links) (Damian Mooyman)
* 2018-03-14 [f51ea4d](https://github.com/silverstripe/silverstripe-admin/commit/f51ea4d4209958b5dd0809eb8f96351cbd5c713f) use scss variable than hard-coded color (#460) (Chris Joe)
* 2018-03-12 [8294ab3](https://github.com/silverstripe/silverstripe-admin/commit/8294ab3cea88ec44f7aebdd658f1b2dbecbf3686) Allow badge-pill class to be modified in Badge component (Robbie Averill)
* 2018-03-12 [79db975](https://github.com/silverstripe/silverstripe-asset-admin/commit/79db975a190c0178699164d63d1fd92bbd6cf9f0) add status badge to uploadfield item (Christopher Joe)
* 2018-03-12 [c92e5fe](https://github.com/silverstripe/silverstripe-versioned/commit/c92e5fef0e422b54bff9fcf453b7346a2a1e0186) Ensure that publishSingle() updates local version (Damian Mooyman)
* 2018-03-08 [5db03d0](https://github.com/silverstripe/silverstripe-versioned/commit/5db03d06fb88face772af77c93a21978d25ab2c4) Add isLiveVersion and isLatestDraftVersion to Versioned and GraphQL DataObject scaffolding (Robbie Averill)
* 2018-03-05 [1a82f03](https://github.com/silverstripe/silverstripe-cms/commit/1a82f0364ad33e18145d4f7e7729c7c0fdce4413) Add page GraphQL query HOC for history viewer component (Robbie Averill)
* 2018-03-05 [083308f](https://github.com/silverstripe/silverstripe-admin/commit/083308fa699dcc8298b3a80ee60b0d1ff63ed034) Update table border colour to lighter grey (Robbie Averill)
* 2018-02-28 [4d424dd](https://github.com/silverstripe/silverstripe-framework/commit/4d424dd3407542641300f6064db0952ddc9acb48) get_by_id: alternate signature to allow MyDataObject::get_by_id($id) (Damian Mooyman)
* 2018-02-28 [5735bee](https://github.com/silverstripe/silverstripe-cms/commit/5735beeb90f97127ae7cb42cecd031b8f168cdf3) Upgrade to Bootstrap 4.0.0-stable and change to reactstrap 5.0.0-beta (#2101) (Luke Edwards)
* 2018-02-28 [62eb29e](https://github.com/silverstripe/silverstripe-campaign-admin/commit/62eb29e5c461af2279bb007c2d18759945124c76) Upgrade to Bootstrap 4.0.0-stable and change to reactstrap 5.0.0-beta (#88) (Luke Edwards)
* 2018-02-27 [f181ba3](https://github.com/silverstripe/silverstripe-asset-admin/commit/f181ba32f750ae2b6bf33f87c632fd3f4419ad93) Upgrade to Bootstrap 4.0.0-stable and change to reactstrap 5.0.0-beta (#737) (Luke Edwards)
* 2018-02-27 [8094c26](https://github.com/silverstripe/silverstripe-admin/commit/8094c2673049c359fd8c061b58191b0886b7a391) Decouple preview from campaign admin (Damian Mooyman)
* 2018-02-27 [5825958](https://github.com/silverstripe/silverstripe-admin/commit/5825958eafe63e6cf1ab88d7940ae1afe7865499) Upgrade to Bootstrap 4.0.0-stable and change to reactstrap 5.0.0-beta (#441) (Luke Edwards)
* 2018-02-27 [9474deb](https://github.com/silverstripe/silverstripe-asset-admin/commit/9474debfd256e3d0401cc8a0a4080f2b09bdf795) Add bulk insert feature for UploadField (Christopher Joe)
* 2018-02-26 [85dae1b](https://github.com/silverstripe/silverstripe-asset-admin/commit/85dae1bbde06e01c8bb19b38eb7e4a3d750f3610) Add warning when unpublishing owned files (#739) (Aaron Carlino)
* 2018-02-26 [c4e705a](https://github.com/silverstripe/silverstripe-campaign-admin/commit/c4e705a7fe117e4d6042c435ea368a2db48ed866) removed max width for content in intro screen (Christopher Joe)
* 2018-02-25 [1202807](https://github.com/silverstripe/silverstripe-admin/commit/12028073f48273179ea12adbbaf84f3db25c0fc7) Add warning for unpublishing owned records #444 (Aaron Carlino)
* 2018-02-25 [fe9f729](https://github.com/silverstripe/silverstripe-versioned/commit/fe9f72950534e669676ca50d9ad781c00aa5148c) Add warning when unpublishing owned records (#122) (Aaron Carlino)
* 2018-02-17 [a214368](https://github.com/silverstripe/silverstripe-framework/commit/a2143680e8ae819d3e9404aba636eb6cb168c319) Add record count to dev/build output. (Sam Minnee)
* 2018-02-15 [de0b76d](https://github.com/silverstripe/silverstripe-framework/commit/de0b76dff6f4519cbe788c6e778b60e589f50b02) Fall back to SSViewer::get_themes when using themeResourceLoaders (Andrew Aitken-Fincham)
* 2018-02-12 [00ff3ba](https://github.com/silverstripe/silverstripe-framework/commit/00ff3ba4b22df024a8fe98c47fb76a70739498fd) Make dropdownFieldThreshold configurable on DBForeignKey (#7789) (Andrew Aitken-Fincham)
* 2018-02-09 [0151449](https://github.com/silverstripe/silverstripe-cms/commit/01514490fe4ef1ea99d4e528e752afa3df0c3575) remove File extension for backlink tracking in favour of UsedOnTable form field (Christopher Joe)
* 2018-02-08 [5f0a7cc](https://github.com/silverstripe/silverstripe-asset-admin/commit/5f0a7ccce69a6a7d9c354709654a463405c1ff0d) add a Usage tab showing owners of files (Christopher Joe)
* 2018-02-08 [c370e3c](https://github.com/silverstripe/silverstripe-admin/commit/c370e3cfdf3171f3b7f2042d0ded5af3619eb5f2) Add a used-on table component for recorded ownerships (Christopher Joe)
* 2018-02-07 [dd82820](https://github.com/silverstripe/silverstripe-framework/commit/dd8282024232eb849693e68320e0f0b6bb02bab5) Allow GridFieldConfig::addComponents to accept an array (#7844) (Robbie Averill)
* 2018-02-07 [b084fe8](https://github.com/silverstripe/silverstripe-cms/commit/b084fe817779b7abd74583c5ddb93f6f7a53d48d) Convert page history notice to use Bootstrap 4 info alert (Robbie Averill)
* 2017-11-30 [9103816](https://github.com/silverstripe/silverstripe-framework/commit/9103816333e790a9b7cd84994e00e0941e34de39) Add php 7.2 support (Daniel Hensby)
* 2017-09-26 [2c121e8](https://github.com/silverstripe/silverstripe-framework/commit/2c121e8a07297baa89c0bedad086b1a62de2ba0a) approach (Daniel Hensby)
### Bugfixes
* 2018-07-20 [78adff9](https://github.com/silverstripe/silverstripe-errorpage/commit/78adff9a99c8778953f891e24f5f818335cea359) Build Static error page from live URL (Maxime Rainville)
* 2018-07-18 [74b655d](https://github.com/silverstripe/silverstripe-framework/commit/74b655d3fcb28db877d839c75f2f3f98b41448cd) tests on unset session data (Ingo Schommer)
* 2018-07-18 [76ac846](https://github.com/silverstripe/silverstripe-framework/commit/76ac8465de768ab08c904e0e8c6075a9f4ceb56b) Lazy session state (fixes #8267) (Ingo Schommer)
* 2018-07-14 [e37b3b9](https://github.com/silverstripe/silverstripe-framework/commit/e37b3b95f4e02eaa8bccd8acc30cdc001d7239c5) updateValidatePassword calls need to be masked from backtraces (Daniel Hensby)
* 2018-07-05 [cebed77](https://github.com/silverstripe/silverstripe-framework/commit/cebed776ab93e8adfbb437dc0b1448ced9f71215) If theres a max-age set remove no-cache and no-store (Daniel Hensby)
* 2018-07-05 [2b1c55b](https://github.com/silverstripe/silverstripe-framework/commit/2b1c55bc4e57d43490973452c8cc773a1a24c8ee) Allow setNoCache(false) to remove no-cache directive (Daniel Hensby)
* 2018-07-05 [842b39e](https://github.com/silverstripe/silverstripe-framework/commit/842b39e9884aefb91866cbcb4943f6aeae586d8b) Add must-revalidate to default state so its common on all our core states (Daniel Hensby)
* 2018-07-05 [997730a](https://github.com/silverstripe/silverstripe-framework/commit/997730aa7f507289da843974a386d0340842c14a) Allow cache control changes to affect default state (Daniel Hensby)
* 2018-07-04 [bde3121](https://github.com/silverstripe/silverstripe-framework/commit/bde3121a33c893eca3bdf2ffff349d1bf15a3e06) Remove X-Requested-With from default Vary header (Sam Minnee)
* 2018-06-26 [6e1c7c2](https://github.com/silverstripe/silverstripe-framework/commit/6e1c7c2781fe8c30806f628038471faba072bb51) remove personal information from password reset confirmation screen (Daniel Hensby)
* 2018-06-21 [793aafa](https://github.com/silverstripe/silverstripe-framework/commit/793aafae917aa190e711ae5c7a18ed59c2812634) Transaction depth should error if not implemented by child classes (Daniel Hensby)
* 2018-06-18 [c77042a](https://github.com/silverstripe/silverstripe-framework/commit/c77042aa8b5ba70f4c9dc6924d2ccccf3d5588a5) linting. (Maxime Rainville)
* 2018-06-18 [b78a89a](https://github.com/silverstripe/silverstripe-framework/commit/b78a89a76cd1c4596a159b8a5043517407de89bc) Default cache state should be `no-cache` (Daniel Hensby)
* 2018-06-18 [225e61d](https://github.com/silverstripe/silverstripe-framework/commit/225e61dc67f5ab550d41c42fa8c80b50b71db5b1) FIx manual resetDBSchema() calls breaking the database (Damian Mooyman)
* 2018-06-18 [11e0a3d](https://github.com/silverstripe/silverstripe-framework/commit/11e0a3de43d7e05b7df63d52b0238e58baff3c2a) Ensure that build includes extra classes (Damian Mooyman)
* 2018-06-15 [3fa2c05](https://github.com/silverstripe/silverstripe-framework/commit/3fa2c056d71a3286ce83017d7cafc180cee076c2) Don't reload form session data using FormField::setSubmittedValue (#8056) (Maxime Rainville)
* 2018-06-15 [74ef975](https://github.com/silverstripe/silverstripe-assets/commit/74ef975459a7f4779c2f4a91c9e277be0ffd81e0) mark legacy migration test as skipped temporarily (Damian Mooyman)
* 2018-06-15 [e70e46e](https://github.com/silverstripe/silverstripe-graphql/commit/e70e46e21628e17f56f542e910379cc2713dfe8c) Fix missing .graphql file category (Damian Mooyman)
* 2018-06-15 [8f7893f](https://github.com/silverstripe/silverstripe-versioned/commit/8f7893fe9af856a712952a8e992a79a24fade84b) Fix unit tests for 4.2 core regressions (Damian Mooyman)
* 2018-06-14 [d52c4dd](https://github.com/silverstripe/silverstripe-framework/commit/d52c4dd602929db5b37cf33261b41c0d3d2098bc) Make regression in #7839 safer (Damian Mooyman)
* 2018-06-14 [acc8d48](https://github.com/silverstripe/silverstripe-framework/commit/acc8d48b11890ec8a4f725e8e330ea56950a43d6) SapphireTest can load relative fixtures in subfolders, switch "needs db" priority check order (Robbie Averill)
* 2018-06-13 [9274692](https://github.com/silverstripe/silverstripe-framework/commit/92746924159e9667429d0fa5ee8c7d5ed34ea514) core tests (Damian Mooyman)
* 2018-06-13 [59ba208](https://github.com/silverstripe/silverstripe-framework/commit/59ba208df010e6a26afeed8c650a5b705ea9361b) HTTPTest (Damian Mooyman)
* 2018-06-13 [6f32762](https://github.com/silverstripe/silverstripe-framework/commit/6f32762268941ba42ad2a129c67172e51cb1a4d3) unit tests (Damian Mooyman)
* 2018-06-13 [aa1ba0e](https://github.com/silverstripe/silverstripe-framework/commit/aa1ba0ef90109fe084a8d736ed4ca08b32a4f40b) inverted condition (Damian Mooyman)
* 2018-06-12 [befd81d](https://github.com/silverstripe/silverstripe-framework/commit/befd81d0c238125b8b82dc8af69b58a1e639a6c4) Bug with forms being cached (Daniel Hensby)
* 2018-06-12 [7c87591](https://github.com/silverstripe/silverstripe-framework/commit/7c875918c7bc48d615b24bc959f659afbad7883b) make sure we create ETags from the body, not the request (Daniel Hensby)
* 2018-06-10 [d842225](https://github.com/silverstripe/silverstripe-framework/commit/d842225df6df2eef1dd6ebd592120ffa5b344c11) Codesniffer style violations with comments (Robbie Averill)
* 2018-06-09 [4e6f45c](https://github.com/silverstripe/silverstripe-framework/commit/4e6f45c2ea4cb3d2349a97a231edaa023f2af219) updateCMSFields example (Juan Molina)
* 2018-06-06 [31ad3cd](https://github.com/silverstripe/silverstripe-framework/commit/31ad3cdaab9623230ce6bdad4e53f6a9a6c9baba) Allow buttons to opt out of display (#8113) (Aaron Carlino)
* 2018-06-05 [bf07ba3](https://github.com/silverstripe/silverstripe-framework/commit/bf07ba30f4b11e1ddc26be50b0366d281bcd4967) Make error messages available to extensions (Jonathon Menz)
* 2018-06-01 [a9e2af6](https://github.com/silverstripe/silverstripe-installer/commit/a9e2af6863c2b32cddf417e43a228a743b3fade7) Remove incorrect classmap for Page and PageController (Robbie Averill)
* 2018-05-31 [4b3e76a](https://github.com/silverstripe/silverstripe-framework/commit/4b3e76a976a11703f2d269d225874269ac2e37a3) missing braces (Aaron Carlino)
* 2018-05-30 [d1af098](https://github.com/silverstripe/silverstripe-versioned/commit/d1af098796dd647023adbde53d5752f14744fd9c) linting (Aaron Carlino)
* 2018-05-16 [396ac65](https://github.com/silverstripe/silverstripe-asset-admin/commit/396ac65106ce1c98e24a43fc11ded2fa54af9455) es per flameohr (Aaron Carlino)
* 2018-05-15 [11c85c6](https://github.com/silverstripe/silverstripe-asset-admin/commit/11c85c63ee8792e443511f2f6582a586bf30ab60) Infinite render loop due to unchecked setState, incorrect binding of handleDrop() (Aaron Carlino)
* 2018-05-10 [e22d1ec](https://github.com/silverstripe/silverstripe-asset-admin/commit/e22d1ec1769e0673f6e7e076c20db506c08a69ec) behat test (Aaron Carlino)
* 2018-05-10 [1993454](https://github.com/silverstripe/silverstripe-asset-admin/commit/19934542d901339625c5b2da5a82d94a4ccbae17) broken delete close editor (Aaron Carlino)
* 2018-05-10 [553ab92](https://github.com/silverstripe/silverstripe-asset-admin/commit/553ab92b85df7fc679294adb32b58aad47c85340) checkbox select behat step (Aaron Carlino)
* 2018-04-30 [abb1011](https://github.com/silverstripe/silverstripe-admin/commit/abb10117a5ea9fa9b8b6322da5ae8f9288d68a38) Expose Badge in injector registrations (Robbie Averill)
* 2018-04-30 [1d3e838](https://github.com/silverstripe/silverstripe-framework/commit/1d3e83838d22744ed51e50469d38c2a0559e893c) phpdoc for relation method (namespace) (JorisDebonnet)
* 2018-04-20 [3f5c3ec](https://github.com/silverstripe/silverstripe-versioned/commit/3f5c3ec9a2be7788cf4f204dff859977860a7104) Fix graphql regressions (Damian Mooyman)
* 2018-04-19 [9727052](https://github.com/silverstripe/silverstripe-versioned/commit/97270527aba45cdf598179fd985dfa112bdb4a1c) Ensure that nested rollbacks don't reset root version (Damian Mooyman)
* 2018-04-18 [4585b0b](https://github.com/silverstripe/silverstripe-framework/commit/4585b0b3828e3574f62aed71e07505a42cbd6893) a broken link to the versioning page. (Maxime Rainville)
* 2018-04-18 [a71b821](https://github.com/silverstripe/silverstripe-asset-admin/commit/a71b8219ba22939adfffccd1cb437b2f47910104) behat test (Damian Mooyman)
* 2018-04-17 [57b006c](https://github.com/silverstripe/silverstripe-campaign-admin/commit/57b006cf2eafdfe2427a914ff4a337327c0550c3) Re-implement flexbox classes for preview window (Robbie Averill)
* 2018-04-16 [0d40b54](https://github.com/silverstripe/silverstripe-cms/commit/0d40b54537664a09dd232ba5fb44cb0cf24f7c82) FIx rollback button from not working (Damian Mooyman)
* 2018-04-16 [02d7989](https://github.com/silverstripe/silverstripe-admin/commit/02d79897edff9f6a17a2657d82b4347bf2d6821d) Ensure FormBuilder loading indicator has a minimum height of the image (Robbie Averill)
* 2018-04-14 [dfa0915](https://github.com/silverstripe/silverstripe-admin/commit/dfa0915e858aec6d643c188aab2df000ba4f1e11) Make 'id' a required prop (Raissa North)
* 2018-04-12 [d21e03d](https://github.com/silverstripe/silverstripe-framework/commit/d21e03d4ed6d8c1c2f60caec183c9301a493afd6) branch alias (Damian Mooyman)
* 2018-04-11 [51173a7](https://github.com/silverstripe/silverstripe-siteconfig/commit/51173a727c016fcfc3d528577bf747324a133ba9) Fixture the 'app' dir instead of mysite in unit tests (Robbie Averill)
* 2018-04-11 [5da708d](https://github.com/silverstripe/silverstripe-cms/commit/5da708d223723f91ffe47672846a3967c52a5326) Fixture the 'app' dir instead of mysite in unit tests (Robbie Averill)
* 2018-04-11 [1041b65](https://github.com/silverstripe/silverstripe-admin/commit/1041b6542ee8ad09714d79b9b6dbdd676735f06e) Add loading indicator for FormBuilderLoader (#481) (Luke Edwards)
* 2018-04-10 [80e0f4d](https://github.com/silverstripe/silverstripe-asset-admin/commit/80e0f4db26e93241ee4a95bfde1c823abe3a5202) File modified indicator missing and draft indicator incorrect style (Luke Edwards)
* 2018-04-09 [79e4f9c](https://github.com/silverstripe/silverstripe-admin/commit/79e4f9cbed4ae230d322ed0fbe1f25f11bed856f) Don't add redundant href="#" to tabs (Damian Mooyman)
* 2018-04-09 [f569785](https://github.com/silverstripe/silverstripe-admin/commit/f56978577b96c525796e3577a9a2eecef32e0a6d) gridfield style issues with negative margins (#474) (Luke Edwards)
* 2018-04-06 [be8287f](https://github.com/silverstripe/silverstripe-framework/commit/be8287fef87244f98b0cbdfd89933bd1ec6754f6) Prevent failover / extensions interfering with composite field properties (#7988) (Damian Mooyman)
* 2018-04-05 [e15a5af](https://github.com/silverstripe/silverstripe-campaign-admin/commit/e15a5afed389a8081d66be96b3511dc64a6721c8) Fix gridfield being cut off on sides (Luke Edwards)
* 2018-04-04 [85f4e65](https://github.com/silverstripe/silverstripe-versioned/commit/85f4e65f8f5ca4eb509837473cbca60f974176d6) Ensure extra fields have correct casting (Damian Mooyman)
* 2018-04-04 [b127422](https://github.com/silverstripe/silverstripe-assets/commit/b1274224d9aeea7d9e14e55d9aaf52aa9f17f26d) linting (Aaron Carlino)
* 2018-04-04 [50ad0ad](https://github.com/silverstripe/silverstripe-asset-admin/commit/50ad0ad15b548d0f23aa41d5bc29972ed9ebeeb8) Fix double popup for unpublish and incorrect confirm (#758) (Damian Mooyman)
* 2018-03-29 [ccbbcd4](https://github.com/silverstripe/silverstripe-framework/commit/ccbbcd45a223ffaba4ab33a4fce0375952c20c1d) Fixed bug in config merging priorities so that config values set by extensions are now least important instead of most important (Daniel Hensby)
* 2018-03-28 [878dc1f](https://github.com/silverstripe/silverstripe-framework/commit/878dc1f86dadbaf501298511177517360ded980e) Change inverse polymorphic inference to silent-empty instead of explicit error (Damian Mooyman)
* 2018-03-27 [484e0a7](https://github.com/silverstripe/silverstripe-versioned/commit/484e0a7f90cb00e77ca32f30554471a8a3dc4461) Ensure polymorphic ownership works (Damian Mooyman)
* 2018-03-27 [9cb974c](https://github.com/silverstripe/silverstripe-framework/commit/9cb974c61925fe3bb1283c179a421e3e97ccdd4b) several mistakes in example code (Aaron Carlino)
* 2018-03-27 [ec37e67](https://github.com/silverstripe/silverstripe-versioned/commit/ec37e6796068f725366310192c63949c1cf366a7) Don't crash on polymorphic ownership (Damian Mooyman)
* 2018-03-27 [e35971b](https://github.com/silverstripe/silverstripe-assets/commit/e35971b32f92452398e092c459ffbd71b329c83c) revert to live (Damian Mooyman)
* 2018-03-22 [436d473](https://github.com/silverstripe/silverstripe-versioned/commit/436d4734d056c5c43a2a08e3bc9a23fb793926e1) Fix regression in canViewVersioned (Damian Mooyman)
* 2018-03-21 [ba94e02](https://github.com/silverstripe/silverstripe-framework/commit/ba94e020e7deadd5deb9b4c6744f72bec37453b3) FunctionalTest not setting persistent versioned mode (Damian Mooyman)
* 2018-03-20 [e277f19](https://github.com/silverstripe/silverstripe-graphql/commit/e277f198d6aba0a9929ba79f5bfb198495d59c6e) merge regressions (Damian Mooyman)
* 2018-03-15 [8568259](https://github.com/silverstripe/silverstripe-admin/commit/8568259061e5bb5f7523b82521355f7e1802e812) id for scaffolded objects (Christopher Joe)
* 2018-03-15 [b2e2a6b](https://github.com/silverstripe/silverstripe-admin/commit/b2e2a6b5133d526c8ac9e54beec264118b2b56a5) bugs with execution (Christopher Joe)
* 2018-03-15 [61ce477](https://github.com/silverstripe/silverstripe-framework/commit/61ce4771f91367cbb4b8a1bf61e2af51964714df) ing HTMLEditorField API documentation (3Dgoo)
* 2018-03-14 [23af7ea](https://github.com/silverstripe/silverstripe-versioned/commit/23af7ea302a654ec21114fef8ccc4eb0eb09b355) Ensure consistent strict equality checks in version numbers (Robbie Averill)
* 2018-03-14 [97f22cb](https://github.com/silverstripe/silverstripe-framework/commit/97f22cbaa5d683cca2f65370a9b827314317436d) ing FormAction API documentation (3Dgoo)
* 2018-03-13 [b06bcc2](https://github.com/silverstripe/silverstripe-versioned/commit/b06bcc24fded9e4718b4c8b182df5d3ed7eb1047) Fix regressions from testing cms unit tests (Damian Mooyman)
* 2018-03-13 [e3e5edb](https://github.com/silverstripe/silverstripe-admin/commit/e3e5edbf4856cbc2eb71a89b600a8542aeba5b34) "container" logic for FormBuilder and PopoverField, improves accessibility (#459) (Chris Joe)
* 2018-03-11 [6f18e35](https://github.com/silverstripe/silverstripe-versioned/commit/6f18e3596fa20720e523f9b2e670e1d5a418d920) sorting issue with versioned test (Damian Mooyman)
* 2018-03-09 [9bed12b](https://github.com/silverstripe/silverstripe-versioned/commit/9bed12b8b696ce849e9eaff72a9ff14f8d9688af) Fix issue in latest_version (Damian Mooyman)
* 2018-03-08 [2e43291](https://github.com/silverstripe/silverstripe-versioned/commit/2e432910fb0d161919474491e3d837641a4bce32) Fix archive date erroring if stage omitted (Damian Mooyman)
* 2018-03-08 [3e698c1](https://github.com/silverstripe/silverstripe-versioned/commit/3e698c1bd0690027bd6cd0082a51b3c1d79974e1) remaining tests (Damian Mooyman)
* 2018-03-08 [be0b274](https://github.com/silverstripe/silverstripe-versioned/commit/be0b2743917a1d064acde3989b3ac89a3a2ae727) testDeleteNestedOwnedWithoutRepublishingOwner (Damian Mooyman)
* 2018-03-08 [0be2a9d](https://github.com/silverstripe/silverstripe-versioned/commit/0be2a9dae588ecee332f9c183ae8bc8a92e5b53b) Fix WasDraft not being written (Damian Mooyman)
* 2018-03-08 [35cff90](https://github.com/silverstripe/silverstripe-versioned/commit/35cff907607cc02def1f53e9a238b99d39ba471b) missing date for deleted _Versioned rows (Damian Mooyman)
* 2018-03-08 [3454600](https://github.com/silverstripe/silverstripe-versioned/commit/3454600ea499741591324bf072876f982d8ae62c) archive / unpublish / delete creating deleted row (Damian Mooyman)
* 2018-03-08 [e839d10](https://github.com/silverstripe/silverstripe-asset-admin/commit/e839d100bd02d7c12c9529a517bbea2a386d802e) responsive modals (#744) (Chris Joe)
* 2018-03-08 [38fbb92](https://github.com/silverstripe/silverstripe-admin/commit/38fbb92decdc4fbbe4c55e6647c68e852ae4a2ac) responsive modals (#457) (Chris Joe)
* 2018-03-07 [ff78a3b](https://github.com/silverstripe/silverstripe-versioned/commit/ff78a3bffc30a6fbc5ee2684718188e817eab506) up testDeleteOwnedWithoutRepublishingOwner (Damian Mooyman)
* 2018-03-07 [640c8f7](https://github.com/silverstripe/silverstripe-versioned/commit/640c8f7b3f56aa958ae462f4195bdd7121c37e97) postgres issue (Damian Mooyman)
* 2018-03-06 [4f8a10d](https://github.com/silverstripe/silverstripe-versioned/commit/4f8a10dd3132f5b2126ee8f888ab504c8aaefd22) invalid joins (Damian Mooyman)
* 2018-03-06 [75168cf](https://github.com/silverstripe/silverstripe-asset-admin/commit/75168cf2fa0fcf1ffc649e67b8ee3c87a675b3ed) multi-select shouldn't show insert button on form (Christopher Joe)
* 2018-03-06 [67fa8e9](https://github.com/silverstripe/silverstripe-admin/commit/67fa8e923ac4a3c5ef457597402c96c21dcd65b1) aligns Form actions container with the rest of the "bottom bars" (Christopher Joe)
* 2018-03-06 [36b6b30](https://github.com/silverstripe/silverstripe-asset-admin/commit/36b6b3025119875110ffb4719591026f78cd123f) up progress indicators (Damian Mooyman)
* 2018-03-05 [c209aff](https://github.com/silverstripe/silverstripe-asset-admin/commit/c209afff96343899c38cc07ba788f9c0deb7fa93) Consolidate queued and read files for Gallery (Christopher Joe)
* 2018-03-01 [49a3970](https://github.com/silverstripe/silverstripe-versioned/commit/49a3970c8722236bf51c0bded8c20d32b2fc4d9a) Resolve Published version field to Versioned_Version::Published() correctly (#125) (Robbie Averill)
* 2018-03-01 [6523d7a](https://github.com/silverstripe/silverstripe-framework/commit/6523d7a6eb3905d5e3cf24120d33232e1eb5d789) ing HTMLEditorField API documentation (3Dgoo)
* 2018-03-01 [c96b6dc](https://github.com/silverstripe/silverstripe-asset-admin/commit/c96b6dceecfa1846990cd14b8cf6250a7879ca02) aesthetic annoyance where deselect+select code will make the bulk actions animate unnecessarily (Christopher Joe)
* 2018-03-01 [222eec8](https://github.com/silverstripe/silverstripe-versioned/commit/222eec81944ebcd2e3a7ad302f8ef8ff65f5e344) Add missing published state filter (Robbie Averill)
* 2018-02-27 [c755f77](https://github.com/silverstripe/silverstripe-framework/commit/c755f77288bcbd5e6777f94d8499264446b456f0) indentation (Aaron Carlino)
* 2018-02-27 [6274ccc](https://github.com/silverstripe/silverstripe-campaign-admin/commit/6274ccce2ee3d66fb361a6335295d3a3eb2dbfe9) behat failure (Aaron Carlino)
* 2018-02-27 [7677c68](https://github.com/silverstripe/silverstripe-admin/commit/7677c68b6b354910c1964f833a0df765daa4e346) Remove max-width from form-fields and items (#446) (Chris Joe)
* 2018-02-27 [efe5c0f](https://github.com/silverstripe/silverstripe-admin/commit/efe5c0f3d251286b27c73ededc68305230c10184) fileSchema abolishing actions from previous props (Christopher Joe)
* 2018-02-21 [0647dee](https://github.com/silverstripe/silverstripe-cms/commit/0647dee8f0e09a23046c1a556e6acb7f6185bf08) travis (Daniel Hensby)
* 2018-02-14 [d019f88](https://github.com/silverstripe/silverstripe-admin/commit/d019f8875aa1e7f42035529ee6de450a20bd1bec) php field to fallback to the form's record and added logic to handle no record available (or not saved) (Christopher Joe)
* 2018-02-13 [42fd4d6](https://github.com/silverstripe/silverstripe-admin/commit/42fd4d6218102042d26607c968c2a773ea093751) Fix display logic for password fields (Damian Mooyman)
* 2018-02-12 [6570599](https://github.com/silverstripe/silverstripe-framework/commit/6570599aa931224e65797d13b74714c44180a9e4) Fix incorrect display logic on password field (Damian Mooyman)
* 2018-02-07 [b5f68eb](https://github.com/silverstripe/silverstripe-cms/commit/b5f68ebed2e7dda145a5eff55b67402f03d6f88f) warning appearing when button is disabled for rollback (Christopher Joe)
* 2018-02-07 [1983200](https://github.com/silverstripe/silverstripe-framework/commit/19832000a53dc57cbd2029502d9064816e0508b1) Fix installer checking wrong location for files (Damian Mooyman)
* 2018-02-02 [1d17f40](https://github.com/silverstripe/silverstripe-graphql/commit/1d17f40f4a587598fb01351df7cd181efb7b05a3) travis builds (Christopher Joe)
* 2017-12-01 [74a3ba5](https://github.com/silverstripe/silverstripe-framework/commit/74a3ba54ae3f02158ba81622bd9933ae3e98c665) count size of $relations (Daniel Hensby)

View File

@ -84,6 +84,7 @@ en:
RelationSearch: 'Relation search'
ResetFilter: Reset
SilverStripe\Forms\GridField\GridFieldDeleteAction:
DELETE_DESCRIPTION: Delete
Delete: Delete
DeletePermissionsFailure: 'No delete permissions'
EditPermissionsFailure: 'No permission to unlink record'
@ -95,7 +96,7 @@ en:
DeletePermissionsFailure: 'No delete permissions'
Deleted: 'Deleted {type} {name}'
Save: Save
SilverStripe\Forms\GridField\GridFieldEditButton:
SilverStripe\Forms\GridField\GridFieldEditButton_ss:
EDIT: Edit
SilverStripe\Forms\GridField\GridFieldGroupDeleteAction:
UnlinkSelfFailure: 'Cannot remove yourself from this group, you will lose admin rights'
@ -149,8 +150,6 @@ en:
other: '{count} years'
SilverStripe\ORM\FieldType\DBEnum:
ANY: Any
SilverStripe\ORM\FieldType\DBForeignKey:
DROPDOWN_THRESHOLD_FALLBACK_MESSAGE: 'Too many related objects; fallback field in use'
SilverStripe\ORM\Hierarchy:
LIMITED_TITLE: 'Too many children ({count})'
SilverStripe\ORM\Hierarchy\Hierarchy:

View File

@ -84,6 +84,7 @@ fr:
RelationSearch: 'Rechercher relations'
ResetFilter: Réinitialiser
SilverStripe\Forms\GridField\GridFieldDeleteAction:
DELETE_DESCRIPTION: Supprimer
Delete: Supprimer
DeletePermissionsFailure: 'Vous navez pas les autorisations pour supprimer'
EditPermissionsFailure: 'Pas de permissions pour délier l''enregistrement'
@ -95,6 +96,8 @@ fr:
DeletePermissionsFailure: 'Vous navez pas les autorisations pour supprimer'
Deleted: '{type} {name} supprimés'
Save: Enregistrer
SilverStripe\Forms\GridField\GridFieldEditButton_ss:
EDIT: Éditer
SilverStripe\Forms\GridField\GridFieldGroupDeleteAction:
UnlinkSelfFailure: 'Impossible de retirer votre propre profil de ce groupe, vous perdriez vos droits d''administration'
SilverStripe\Forms\GridField\GridFieldPaginator:

View File

@ -1,7 +1,37 @@
pl:
SilverStripe\Admin\LeftAndMain:
VersionUnknown: Nieznany
SilverStripe\AssetAdmin\Forms\UploadField:
Dimensions: Rozmiar
EDIT: Edytuj
EDITINFO: 'Edytuj plik'
REMOVE: Usuń
SilverStripe\Control\ChangePasswordEmail_ss:
CHANGEPASSWORDFOREMAIL: 'Hasło do konta o adresie e-mail {email} zostało zmienione. Jeśli nie zmieniłeś swojego hasła, zmień hasło, korzystając z poniższego linku'
CHANGEPASSWORDTEXT1: 'Zmieniłeś hasło na'
CHANGEPASSWORDTEXT3: 'Zmień hasło'
HELLO: 'Witaj,'
SilverStripe\Control\Email\ForgotPasswordEmail_ss:
HELLO: 'Witaj,'
TEXT1: 'Oto twój'
TEXT2: 'link zmiany hasła'
TEXT3: dla
SilverStripe\Control\RequestProcessor:
INVALID_REQUEST: 'Nieprawidłowe żądanie'
REQUEST_ABORTED: 'Żądanie zostało przerwane'
SilverStripe\Core\Manifest\VersionProvider:
VERSIONUNKNOWN: Nieznany
SilverStripe\Forms\CheckboxField:
NOANSWER: Nie
YESANSWER: Tak
SilverStripe\Forms\CheckboxSetField_ss:
NOOPTIONSAVAILABLE: 'Brak dostępnych opcji'
SilverStripe\Forms\ConfirmedPasswordField:
ATLEAST: 'Hasła muszą mieć przynajmniej {min} znaków.'
BETWEEN: 'Hasła muszą mieć długość pomiędzy {min} a {max} znaków.'
CURRENT_PASSWORD_ERROR: 'Podane hasło jest nieprawidłowe'
CURRENT_PASSWORD_MISSING: 'Musisz podać swoje aktualne hasło.'
LOGGED_IN_ERROR: 'Musisz być zalogowany aby zmienić hasło'
MAXIMUM: 'Hasła mogą mieć co najwyżej {max} znaków.'
SHOWONCLICKTITLE: 'Zmiana Hasła'
SilverStripe\Forms\CurrencyField:
@ -10,23 +40,38 @@ pl:
VALIDDATEFORMAT2: 'Proszę wprowadź prawidłowy format daty ({format})'
VALIDDATEMAXDATE: 'Twoja data musi być wcześniejsza lub taka sama, jak maksymalna dozwolona data ({date})'
VALIDDATEMINDATE: 'Twoja data musi być późniejsza lub taka sama, jak minimalna dozwolona data ({date})'
SilverStripe\Forms\DatetimeField:
VALIDDATEMAXDATETIME: 'Twoja data musi być wcześniejsza lub taka sama, jak maksymalna dozwolona data ({date})'
VALIDDATETIMEFORMAT: 'Proszę wprowadź prawidłowy format czasu ({format})'
VALIDDATETIMEMINDATE: 'Twoja data musi być późniejsza lub taka sama, jak minimalna dozwolona data ({date})'
SilverStripe\Forms\DropdownField:
CHOOSE: (wybierz)
CHOOSE_MODEL: '(Wybierz {name})'
SOURCE_VALIDATION: 'Wybierz wartość z podanej listy. {value} nie jest poprawną opcją'
SilverStripe\Forms\EmailField:
VALIDATION: 'Proszę podaj adres e-mail'
SilverStripe\Forms\FileUploadReceiver:
FIELDNOTSET: 'Nie znaleziono informacji o pliku'
SilverStripe\Forms\Form:
BAD_METHOD: 'Ten formularz wymaga {metody} przesłania'
CSRF_EXPIRED_MESSAGE: 'Twoja sesja wygasła. Prześlij ponownie formularz.'
CSRF_FAILED_MESSAGE: 'Wygląda na to, że wystąpił błąd techniczny. Kliknij przycisk wstecz, następnie odśwież przeglądarkę aby wczytać stronę ponownie.'
VALIDATIONPASSWORDSDONTMATCH: 'Hasła nie są takie same'
VALIDATIONPASSWORDSNOTEMPTY: 'Hasło nie może być puste'
VALIDATIONSTRONGPASSWORD: 'Hasła muszą mieć przynajmniej jedną cyfrę oraz jeden znak alfanumeryczny.'
VALIDATOR: Walidator
VALIDCURRENCY: 'Proszę podaj prawidłową walutę'
SilverStripe\Forms\FormField:
EXAMPLE: 'na przykład {format}'
NONE: brak
SilverStripe\Forms\FormScaffolder:
TABMAIN: Główny
SilverStripe\Forms\GridField\GridField:
Add: 'Dodaj {name}'
CSVEXPORT: 'Eksportuj do CSV'
CSVIMPORT: 'Import z CSV'
Filter: Filtr
FilterBy: 'Filtruj wg'
FilterBy: 'Filtruj wg '
Find: Wyszukaj
LinkExisting: 'Linkuj istniejący'
NewRecord: 'Nowy {type}'
@ -39,6 +84,7 @@ pl:
RelationSearch: 'Wyszukiwanie powiązań'
ResetFilter: Resetuj
SilverStripe\Forms\GridField\GridFieldDeleteAction:
DELETE_DESCRIPTION: Usuń
Delete: Usuń
DeletePermissionsFailure: 'Brak uprawnień do usuwania'
EditPermissionsFailure: 'Nie masz uprawnień, aby odłączyć rekord'
@ -50,55 +96,147 @@ pl:
DeletePermissionsFailure: 'Brak uprawnień do usuwania'
Deleted: 'Usunięto {type} {name}'
Save: Zapisz
SilverStripe\Forms\GridField\GridFieldEditButton_ss:
EDIT: Edytuj
SilverStripe\Forms\GridField\GridFieldGroupDeleteAction:
UnlinkSelfFailure: 'Nie możesz usunąć siebie z tej grupy, stracone zostałby prawa administratora'
SilverStripe\Forms\GridField\GridFieldPaginator:
OF: z
Page: Strona
View: Widok
SilverStripe\Forms\MoneyField:
FIELDLABELAMOUNT: Ilość
FIELDLABELCURRENCY: waluta
INVALID_CURRENCY: 'Waluta {currency} nie znajduje się na liście dozwolonych walut'
SilverStripe\Forms\MultiSelectField:
SOURCE_VALIDATION: 'Wybierz wartości z podanej listy. Podano niepoprawną opcję {value}'
SilverStripe\Forms\NullableField:
IsNullLabel: 'Jest Pusty'
SilverStripe\Forms\NumericField:
VALIDATION: '''{value}'' nie jest liczbą, to pole przyjmuje tylko liczby'
SilverStripe\Forms\TimeField:
VALIDATEFORMAT: 'Proszę wprowadź prawidłowy format czasu ({format})'
SilverStripe\ORM\DataObject:
PLURALNAME: 'Obiekty danych'
PLURALS:
one: 'Obiekt danych'
few: 'Obiektów danych'
many: 'Obiektów danych'
other: 'Obiektów danych {count}'
SINGULARNAME: 'Obiekt danych'
SilverStripe\ORM\FieldType\DBBoolean:
ANY: Jakikolwiek
NOANSWER: Nie
YESANSWER: Tak
SilverStripe\ORM\FieldType\DBDate:
DAYS_SHORT_PLURALS:
one: '{count} dzień'
few: '{count} dni'
many: '{count} dni'
other: '{count} dni'
HOURS_SHORT_PLURALS:
one: '{count} godzina'
few: '{count} godzin'
many: '{count} godzin'
other: '{count} godzin'
LessThanMinuteAgo: 'mniej niż minuta'
MINUTES_SHORT_PLURALS:
one: '{count} minuta'
few: '{count} minut'
many: '{count} minut'
other: '{count} minut'
MONTHS_SHORT_PLURALS:
one: '{count} miesiąc'
few: '{count} miesięcy'
many: '{count} miesięcy'
other: '{count} miesięcy'
SECONDS_SHORT_PLURALS:
one: '{count} sekunda'
few: '{count} sekund'
many: '{count} sekund'
other: '{count} sekund'
TIMEDIFFAGO: '{difference} temu'
TIMEDIFFIN: 'w {difference}'
YEARS_SHORT_PLURALS:
one: '{count} rok'
few: '{count} lat'
many: '{count} lat'
other: '{count} lat'
SilverStripe\ORM\FieldType\DBEnum:
ANY: Jakikolwiek
SilverStripe\ORM\Hierarchy:
LIMITED_TITLE: 'Zbyt wiele dzieci ({count})'
SilverStripe\ORM\Hierarchy\Hierarchy:
InfiniteLoopNotAllowed: 'Znaleziono nieskończoną pętlę wewnątrz hierarchii "{type}". Proszę zmień rodzica by to rozwiązać.'
LIMITED_TITLE: 'Zbyt wiele dzieci ({count})'
SilverStripe\ORM\ValidationException:
DEFAULT_ERROR: 'Niepoprawne dane'
SilverStripe\Security\BasicAuth:
ENTERINFO: 'Wprowadź username i hasło'
ERRORNOTADMIN: 'Ten użytkownik nie jest administratorem'
ERRORNOTREC: 'Nie istnieje taki username/hasło'
SilverStripe\Security\CMSMemberLoginForm:
PASSWORDEXPIRED: '<p>Twoje hasło wygasło. <a target="_top" href="{link}">Prosimy wybrać nowe.</a></p>'
SilverStripe\Security\CMSSecurity:
INVALIDUSER: '<p>Niepoprawny użytkownik. <a target="_top" href="{link}">Prosimy o ponownie uwierzytelnienie</a> aby kontynuować.</p>'
LOGIN_MESSAGE: '<p>Twoja sesja wygasła z powodu braku aktywności</p>'
LOGIN_TITLE: 'Wróć do strony, z którym połączenie zostało przerwane, logując się ponownie'
SUCCESS: Sukces
SUCCESSCONTENT: '<p>Zalogowano poprawnie! Jeżeli nie zostaniesz automatycznie przekierowany <a target="_top" href="{link}">kliknij tutaj</a></p>'
SUCCESS_TITLE: 'Zalogowano poprawne'
SilverStripe\Security\DefaultAdminService:
DefaultAdminFirstname: 'Domyślny administrator'
SilverStripe\Security\Group:
AddRole: 'Dodaj rolę dla tej grupy'
Code: 'Kod Grupy'
DefaultGroupTitleAdministrators: Administratorzy
DefaultGroupTitleContentAuthors: 'Autor treści'
Description: Opis
GROUPNAME: 'Nazwa Grupy'
GroupReminder: 'Jeśli wybierzesz nadrzędną grupę, obecna grupa otrzyma wszystkie jej role'
HierarchyPermsError: 'Nie można przyporządkować uprzywilejowanej grupy "{group}" (wymagane uprawnienie ADMIN)'
Locked: 'Zablokowana?'
MEMBERS: Użytkownicy
NEWGROUP: 'Nowa grupa'
NoRoles: 'Nie znaleziono ról'
PERMISSIONS: Uprawnienia
PLURALNAME: Grupy
PLURALS:
one: Grupa
few: Grup
many: Grup
other: '{count} grup'
Parent: 'Grupa nadrzędna'
ROLES: Role
ROLESDESCRIPTION: 'Role są wstępnie zdefiniowanymi zestawami uprawnień i można je przypisać do grup.<br />TW razie potrzeby są one dziedziczone z grup nadrzędnych.'
RolesAddEditLink: 'Zarządzaj rolami'
SINGULARNAME: Grupa
Sort: 'Kolejność Sortowania'
has_many_Permissions: Zezwolenia
many_many_Members: Użytkownicy
SilverStripe\Security\LoginAttempt:
Email: 'Adres e-mail'
EmailHashed: 'Adres e-mail (hashed)'
IP: 'Adres IP'
PLURALNAME: 'Próby logowania'
PLURALS:
one: 'Próba logowania'
few: 'Prób logowania'
many: 'Próby logowania {count}'
other: 'Próby logowania {count}'
SINGULARNAME: 'Próba logowania'
Status: Status
SilverStripe\Security\Member:
ADDGROUP: 'Dodaj grupę'
BUTTONCHANGEPASSWORD: 'Zmień hasło'
BUTTONLOGIN: Zaloguj
BUTTONLOGINOTHER: 'Zaloguj jako ktoś inny'
BUTTONLOGOUT: 'Wyloguj się'
BUTTONLOSTPASSWORD: 'Zgubiłem hasło'
CONFIRMNEWPASSWORD: 'Potwierdź nowe hasło'
CONFIRMPASSWORD: 'Potwierdź hasło'
CURRENT_PASSWORD: 'Aktualne hasło'
EDIT_PASSWORD: 'Nowe hasło'
EMAIL: E-mail
EMPTYNEWPASSWORD: 'Nowe hasło nie może być puste, spróbuj ponownie.'
ENTEREMAIL: 'Wpisz adres e-mail aby otrzymać link do zmiany hasła.'
@ -108,12 +246,23 @@ pl:
ERRORWRONGCRED: 'Podane dane są niepoprawne. Proszę spróbować ponownie.'
FIRSTNAME: Imię
INTERFACELANG: 'Język interfejsu'
KEEPMESIGNEDIN: 'Zapamiętaj mnie'
LOGGEDINAS: 'Zostałeś zalogowany jako {name}.'
NEWPASSWORD: 'Nowe hasło'
PASSWORD: Hasło
PASSWORDEXPIRED: 'Twoje hasło wygasło. Prosimy ustawić nowe.'
PLURALNAME: Użytkownicy
PLURALS:
one: Użytkownik
few: '{count} użytkowników'
many: '{count} użytkowników'
other: '{count} użytkowników'
REMEMBERME: 'Pamiętaj mnie następnym razem? (przez {count} dni na tym urządzeniu)'
SINGULARNAME: Użytkownik
SUBJECTPASSWORDCHANGED: 'Twoje hasło zostało zmienione'
SUBJECTPASSWORDRESET: 'Twój link do zmiany hasła'
SURNAME: Nazwisko
VALIDATIONADMINLOSTACCESS: 'Nie można usunąć wszystkich grup administracyjnych z Twojego profilu'
ValidationIdentifierFailed: 'Nie można nadpisać istniejącego użytkownika #{id} o identycznym identyfikatorze ({name} = {value})'
WELCOMEBACK: 'Witaj ponownie, {firstname}'
YOUROLDPASSWORD: 'Twoje stare hasło'
@ -122,15 +271,42 @@ pl:
db_LockedOutUntil: 'Zablokowany do'
db_Password: Hasło
db_PasswordExpiry: 'Data wygaśnięcia hasła'
SilverStripe\Security\MemberAuthenticator\CMSMemberLoginForm:
AUTHENTICATORNAME: 'Formularz logowania użytkownika CMS'
BUTTONFORGOTPASSWORD: 'Zapomniałeś hasła?'
BUTTONLOGIN: 'Zaloguj mnie spowrotem'
BUTTONLOGOUT: 'Wyloguj się'
SilverStripe\Security\MemberAuthenticator\MemberAuthenticator:
ERRORWRONGCRED: 'Podane dane są niepoprawne. Proszę spróbować ponownie.'
NoPassword: 'Hasło nie zostało skonfigurowane dla tego użytkownika.'
SilverStripe\Security\MemberAuthenticator\MemberLoginForm:
AUTHENTICATORNAME: 'E-mail i hasło'
SilverStripe\Security\MemberPassword:
PLURALNAME: 'Hasła użytkownika'
PLURALS:
one: 'Hasło użytkownika'
few: 'Haseł użytkownika'
many: 'Haseł użytkownika'
other: '{count} haseł użytkownika '
SINGULARNAME: 'Hasło użytkownika'
SilverStripe\Security\PasswordValidator:
LOWCHARSTRENGTH: 'Proszę zwiększyć siłę hasła, dodając niektóre z następujących znaków: % s'
PREVPASSWORD: 'Użyłeś już tego hasła wcześniej, proszę wybrać nowe'
TOOSHORT: 'Hasło jest za krótkie, proszę podać {minimum} znaków lub więcej'
SilverStripe\Security\Permission:
AdminGroup: Administrator
CMS_ACCESS_CATEGORY: 'Dostęp do CMS''a'
CONTENT_CATEGORY: 'Uprawnienie edycji treści'
FULLADMINRIGHTS: 'Pełne prawa administracyjne'
FULLADMINRIGHTS_HELP: 'Zatwierdza i nadpisuje wszystkie istniejące uprawnienia'
PERMISSIONS_CATEGORY: 'Uprawnienia ról i dostępu'
PLURALNAME: Uprawnienia
PLURALS:
one: Uprawnienie
few: Uprawnień
many: Uprawnień
other: '{count} uprawnień'
SINGULARNAME: Uprawnienie
UserPermissionsIntro: 'Przydzielenie grup temu użytkownikowi spowoduje zmianę jego uprawnień. Odwołaj się do sekcji Grupy aby dowiedzieć się więcej o uprawnieniach grupowych.'
SilverStripe\Security\PermissionCheckboxSetField:
AssignedTo: 'przypisany do "{title}"'
@ -139,17 +315,41 @@ pl:
FromRoleOnGroup: 'odziedziczone z roli "{roletitle}" w grupie "{grouptitle}"'
SilverStripe\Security\PermissionRole:
OnlyAdminCanApply: 'Tylko administrator może to zastosować'
PLURALNAME: Role
PLURALS:
one: Rola
few: ról
many: ról
other: '{count} ról'
SINGULARNAME: Rola
Title: Tytuł
SilverStripe\Security\PermissionRoleCode:
PLURALNAME: 'Kod roli uprawnienia'
PLURALS:
one: 'Kod roli uprawnienia'
few: 'Kodów ról uprawnień'
many: 'Kodów ról uprawnień'
other: '{count} kodów ról uprawnień'
PermsError: 'Nie można przyporządkować uprzywilejowanego uprawnienia "{code}" (wymagane uprawnienie ADMIN)'
SINGULARNAME: 'Kod roli uprawnienia'
SilverStripe\Security\RememberLoginHash:
PLURALNAME: 'Hasła logowania'
PLURALS:
one: 'Hasło logowania'
few: 'Haseł logowania'
many: 'Haseł logowania'
other: '{count} haseł logowania'
SINGULARNAME: 'Hasło logowania'
SilverStripe\Security\Security:
ALREADYLOGGEDIN: 'Nie masz dostępu do tej strony. Jeśli posiadasz inne konto, które umożliwi Ci dostęp do tej strony, możesz się zalogować poniżej'
BUTTONSEND: 'Wyślij mi link do zresetowania hasła'
CHANGEPASSWORDBELOW: 'Możesz zmienić swoje hasło poniżej'
CHANGEPASSWORDHEADER: 'Zmień swoje hasło'
CONFIRMLOGOUT: 'Kliknij przycisk poniżej, aby potwierdzić, że chcesz się wylogować.'
ENTERNEWPASSWORD: 'Proszę wprowadż nowe hasło'
ERRORPASSWORDPERMISSION: 'Musisz być zalogowany aby zmienić hasło'
LOGIN: Logowanie
LOGOUT: 'Wyloguj się'
LOSTPASSWORDHEADER: 'Nie pamiętam hasła'
NOTEPAGESECURED: 'Ta strona jest zabezpieczona. Wpisz swoje dane a my wyślemy Ci potwierdzenie niebawem'
NOTERESETLINKINVALID: '<p>Link resetujący hasło wygasł lub jest nieprawidłowy.</p><p>Możesz poprosić o nowy <a href="{link1}">tutaj</a> lub zmień swoje hasło po <a href="{link2}">zalogowaniu się</a>.</p>'

View File

@ -993,6 +993,9 @@ class Director implements TemplateGlobalProvider
* Checks if the current HTTP-Request is an "Ajax-Request" by checking for a custom header set by
* jQuery or whether a manually set request-parameter 'ajax' is present.
*
* Note that if you plan to use this to alter your HTTP response on a cached page,
* you should add X-Requested-With to the Vary header.
*
* @param HTTPRequest $request
* @return bool
*/

View File

@ -71,6 +71,7 @@ class HTTP
/**
* List of names to add to the Cache-Control header.
*
* @deprecated 4.2..5.0 Handled by HTTPCacheControlMiddleware instead
* @see HTTPCacheControlMiddleware::__construct()
* @config
* @var array Keys are cache control names, values are boolean flags
@ -80,7 +81,7 @@ class HTTP
/**
* Vary string; A comma separated list of var header names
*
* @deprecated 4.2..5.0 Handled by HTTPCacheMiddleware instead
* @deprecated 4.2..5.0 Handled by HTTPCacheControlMiddleware instead
* @config
* @var string|null
*/
@ -473,6 +474,7 @@ class HTTP
* Ensure that all deprecated HTTP cache settings are respected
*
* @deprecated 4.2..5.0 Use HTTPCacheControlMiddleware instead
* @throws \LogicException
* @param HTTPRequest $request
* @param HTTPResponse $response
*/
@ -509,6 +511,37 @@ class HTTP
$cacheControlMiddleware->addVary($configVary);
}
// Pass cache_control to middleware
$configCacheControl = $config->get('cache_control');
if ($configCacheControl) {
Deprecation::notice('5.0', 'Use HTTPCacheControlMiddleware API instead');
$supportedDirectives = ['max-age', 'no-cache', 'no-store', 'must-revalidate'];
if ($foundUnsupported = array_diff(array_keys($configCacheControl), $supportedDirectives)) {
throw new \LogicException(
'Found unsupported legacy directives in HTTP.cache_control: ' .
implode(', ', $foundUnsupported) .
'. Please use HTTPCacheControlMiddleware API instead'
);
}
if (isset($configCacheControl['max-age'])) {
$cacheControlMiddleware->setMaxAge($configCacheControl['max-age']);
}
if (isset($configCacheControl['no-cache'])) {
$cacheControlMiddleware->setNoCache((bool)$configCacheControl['no-cache']);
}
if (isset($configCacheControl['no-store'])) {
$cacheControlMiddleware->setNoStore((bool)$configCacheControl['no-store']);
}
if (isset($configCacheControl['must-revalidate'])) {
$cacheControlMiddleware->setMustRevalidate((bool)$configCacheControl['must-revalidate']);
}
}
// Set modification date
if (self::$modification_date) {
Deprecation::notice('5.0', 'Use HTTPCacheControlMiddleware::registerModificationDate() instead');

View File

@ -136,7 +136,6 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
* @var array
*/
private static $defaultVary = [
"X-Requested-With" => true,
"X-Forwarded-Protocol" => true,
];
@ -507,7 +506,8 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
/**
* Specifies the maximum amount of time (seconds) a resource will be considered fresh.
* This directive is relative to the time of the request.
* Affects all non-disabled states. Use setStateDirective() instead to set for a single state.
* Affects all non-disabled states. Use enableCache(), publicCache() or
* setStateDirective() instead to set the max age for a single state.
*
* @param int $age
* @return $this
@ -560,6 +560,7 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
/**
* Simple way to set cache control header to a cacheable state.
* Needs either `setMaxAge()` or the `$maxAge` method argument in order to activate caching.
*
* The resulting cache-control headers will be chosen from the 'enabled' set of directives.
*
@ -568,14 +569,20 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
*
* @see https://docs.silverstripe.org/en/developer_guides/performance/http_cache_headers/
* @param bool $force Force the cache to public even if its unforced private or public
* @param int $maxAge Shortcut for `setMaxAge()`, which is required to actually enable the cache.
* @return $this
*/
public function enableCache($force = false)
public function enableCache($force = false, $maxAge = null)
{
// Only execute this if its forcing level is high enough
if ($this->applyChangeLevel(self::LEVEL_ENABLED, $force)) {
$this->setState(self::STATE_ENABLED);
}
if (!is_null($maxAge)) {
$this->setMaxAge($maxAge);
}
return $this;
}
@ -627,20 +634,27 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
/**
* Advanced way to set cache control header to a cacheable state.
* Indicates that the response may be cached by any cache. (eg: CDNs, Proxies, Web browsers)
* Indicates that the response may be cached by any cache. (eg: CDNs, Proxies, Web browsers).
* Needs either `setMaxAge()` or the `$maxAge` method argument in order to activate caching.
*
* The resulting cache-control headers will be chosen from the 'private' set of directives.
*
* @see https://docs.silverstripe.org/en/developer_guides/performance/http_cache_headers/
* @param bool $force Force the cache to public even if it's private, unless it's been forced private
* @param int $maxAge Shortcut for `setMaxAge()`, which is required to actually enable the cache.
* @return $this
*/
public function publicCache($force = false)
public function publicCache($force = false, $maxAge = null)
{
// Only execute this if its forcing level is high enough
if ($this->applyChangeLevel(self::LEVEL_PUBLIC, $force)) {
$this->setState(self::STATE_PUBLIC);
}
if (!is_null($maxAge)) {
$this->setMaxAge($maxAge);
}
return $this;
}

View File

@ -6,8 +6,6 @@ use BadMethodCallException;
use Exception;
use InvalidArgumentException;
use LogicException;
use SilverStripe\Control\HTTP;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Injector\Injector;

View File

@ -9,6 +9,7 @@ use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\Middleware\HTTPCacheControlMiddleware;
use SilverStripe\Control\Session;
use SilverStripe\Core\Config\Config;
use SilverStripe\Dev\FunctionalTest;
/**
@ -112,6 +113,79 @@ class HTTPTest extends FunctionalTest
$this->assertEmpty($v);
}
public function testDeprecatedVaryHandling()
{
/** @var Config */
Config::modify()->set(
HTTP::class,
'vary',
'X-Foo'
);
$response = new HTTPResponse('', 200);
$this->addCacheHeaders($response);
$header = $response->getHeader('Vary');
$this->assertContains('X-Foo', $header);
}
public function testDeprecatedCacheControlHandling()
{
HTTPCacheControlMiddleware::singleton()->publicCache();
/** @var Config */
Config::modify()->set(
HTTP::class,
'cache_control',
[
'no-store' => true,
'no-cache' => true,
]
);
$response = new HTTPResponse('', 200);
$this->addCacheHeaders($response);
$header = $response->getHeader('Cache-Control');
$this->assertContains('no-store', $header);
$this->assertContains('no-cache', $header);
}
public function testDeprecatedCacheControlHandlingOnMaxAge()
{
HTTPCacheControlMiddleware::singleton()->publicCache();
/** @var Config */
Config::modify()->set(
HTTP::class,
'cache_control',
[
// Needs to be separate from no-cache and no-store,
// since that would unset max-age
'max-age' => 99,
]
);
$response = new HTTPResponse('', 200);
$this->addCacheHeaders($response);
$header = $response->getHeader('Cache-Control');
$this->assertContains('max-age=99', $header);
}
/**
* @expectedException \LogicException
* @expectedExceptionMessageRegExp /Found unsupported legacy directives in HTTP\.cache_control: unknown/
*/
public function testDeprecatedCacheControlHandlingThrowsWithUnknownDirectives()
{
/** @var Config */
Config::modify()->set(
HTTP::class,
'cache_control',
[
'no-store' => true,
'unknown' => true,
]
);
$response = new HTTPResponse('', 200);
$this->addCacheHeaders($response);
}
/**
* Tests {@link HTTP::getLinksIn()}
*/

View File

@ -68,6 +68,65 @@ class HTTPCacheControlMiddlewareTest extends SapphireTest
}
}
public function testEnableCacheWithMaxAge()
{
$maxAge = 300;
$cc = HTTPCacheControlMiddleware::singleton();
$cc->enableCache(false, $maxAge);
$response = new HTTPResponse();
$cc->applyToResponse($response);
$this->assertContains('max-age=300', $response->getHeader('cache-control'));
$this->assertNotContains('no-cache', $response->getHeader('cache-control'));
$this->assertNotContains('no-store', $response->getHeader('cache-control'));
}
public function testEnableCacheWithMaxAgeAppliesWhenLevelDoesNot()
{
$maxAge = 300;
$cc = HTTPCacheControlMiddleware::singleton();
$cc->privateCache(true);
$cc->enableCache(false, $maxAge);
$response = new HTTPResponse();
$cc->applyToResponse($response);
$this->assertContains('max-age=300', $response->getHeader('cache-control'));
}
public function testPublicCacheWithMaxAge()
{
$maxAge = 300;
$cc = HTTPCacheControlMiddleware::singleton();
$cc->publicCache(false, $maxAge);
$response = new HTTPResponse();
$cc->applyToResponse($response);
$this->assertContains('max-age=300', $response->getHeader('cache-control'));
// STATE_PUBLIC doesn't contain no-cache or no-store headers to begin with,
// so can't test their removal effectively
$this->assertNotContains('no-cache', $response->getHeader('cache-control'));
}
public function testPublicCacheWithMaxAgeAppliesWhenLevelDoesNot()
{
$maxAge = 300;
$cc = HTTPCacheControlMiddleware::singleton();
$cc->privateCache(true);
$cc->publicCache(false, $maxAge);
$response = new HTTPResponse();
$cc->applyToResponse($response);
$this->assertContains('max-age=300', $response->getHeader('cache-control'));
}
/**
* @dataProvider provideCacheStates
*/