mirror of
https://github.com/silverstripe/silverstripe-versionfeed
synced 2024-10-22 11:05:31 +02:00
FIX: update docs & language references
This commit is contained in:
parent
d536df0d32
commit
5096179825
18
README.md
18
README.md
@ -1,6 +1,8 @@
|
|||||||
# Version Feed
|
# Version Feed
|
||||||
|
|
||||||
[![Build Status](https://secure.travis-ci.org/silverstripe/silverstripe-versionfeed.png)](http://travis-ci.org/silverstripe/silverstripe-versionfeed)
|
[![Build Status](http://img.shields.io/travis/silverstripe/silverstripe-versionfeed.svg?style=flat)](https://travis-ci.org/silverstripe/silverstripe-versionfeed)
|
||||||
|
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-versionfeed/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-versionfeed/?branch=master)
|
||||||
|
[![codecov](https://codecov.io/gh/silverstripe/silverstripe-versionfeed/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/silverstripe-versionfeed)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@ -8,24 +10,18 @@ The module creates an RSS feed on each page with their change history, as well a
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
* SilverStripe 3.0+
|
* SilverStripe ^4
|
||||||
|
|
||||||
|
**Note:** For a SilverStripe 3.x compatible version, please use [the 1.x release line](https://github.com/silverstripe/silverstripe-versionfeed/tree/1.2).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Install with composer by running:
|
Install with composer by running `composer require silverstripe/versionfeed` in the root of your SilverStripe project.
|
||||||
|
|
||||||
composer require silverstripe/versionfeed:*
|
|
||||||
|
|
||||||
in the root of your SilverStripe project.
|
|
||||||
|
|
||||||
Or just clone/download the git repository into a subfolder (usually called "versionfeed") of your SilverStripe project.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
For usage instructions see [user manual](docs/en/userguide/index.md).
|
For usage instructions see [user manual](docs/en/userguide/index.md).
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
### Translations
|
### Translations
|
||||||
|
|
||||||
Translations of the natural language strings are managed through a third party translation interface, transifex.com. Newly added strings will be periodically uploaded there for translation, and any new translations will be merged back to the project source code.
|
Translations of the natural language strings are managed through a third party translation interface, transifex.com. Newly added strings will be periodically uploaded there for translation, and any new translations will be merged back to the project source code.
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# 1.0.3
|
|
||||||
|
|
||||||
## Upgrading
|
|
||||||
|
|
||||||
* Caching and rate limiting rules now apply in this version, and it may be necessary to adjust the values
|
|
||||||
for `RateLimitFilter.lock_timeout`, `RateLimitFilter.lock_bypage` and `RateLimitFilter.lock_byuserip` configs.
|
|
||||||
See the [Developer Documentation](../developer.md) for information on how these affect cache performance and behaviour.
|
|
@ -9,12 +9,12 @@ the extensions defined on the extension.
|
|||||||
|
|
||||||
### Enabling / Disabling
|
### Enabling / Disabling
|
||||||
|
|
||||||
The `allchanges` feed can be disabled by setting the `VersionFeed.allchanges_enabled` config to false.
|
The `allchanges` feed can be disabled by setting the `SilverStripe\VersionFeed\VersionFeed.allchanges_enabled` config to false.
|
||||||
|
|
||||||
Likewise, the `changes` feed for each page can be globally disabled by setting the `VersionFeed.changes_enabled`
|
Likewise, the `changes` feed for each page can be globally disabled by setting the `SilverStripe\VersionFeed\VersionFeed.changes_enabled`
|
||||||
config to false. If this left true, then each page can still be individually disabled by unchecking the
|
config to false. If this left true, then each page can still be individually disabled by unchecking the
|
||||||
'Make History Public' checkbox in the CMS under page settings.
|
'Make History Public' checkbox in the CMS under page settings.
|
||||||
See [user documentation on enabling / disabling](user.md#enabling--disabling).
|
See [user documentation on enabling / disabling](userguide/index.md#enabling--disabling).
|
||||||
|
|
||||||
### Default RSS action
|
### Default RSS action
|
||||||
|
|
||||||
@ -22,12 +22,13 @@ Templates can offer a "Subscribe" link with a link to the most relevant RSS feed
|
|||||||
for the current page. You can override this behaviour by defining the `getDefaultRSSLink` function in your page type
|
for the current page. You can override this behaviour by defining the `getDefaultRSSLink` function in your page type
|
||||||
and returning the URL of your desired RSS feed:
|
and returning the URL of your desired RSS feed:
|
||||||
|
|
||||||
:::php
|
```php
|
||||||
class MyPage extends Page {
|
class MyPage extends Page {
|
||||||
function getDefaultRSSLink() {
|
function getDefaultRSSLink() {
|
||||||
return $this->Link('myrssfeed');
|
return $this->Link('myrssfeed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
This can be used in templates as `$DefaultRSSLink`.
|
This can be used in templates as `$DefaultRSSLink`.
|
||||||
|
|
||||||
@ -36,31 +37,31 @@ This can be used in templates as `$DefaultRSSLink`.
|
|||||||
By default all content is filtered based on the rules specified in `versionfeed/_config/versionfeed.yml`.
|
By default all content is filtered based on the rules specified in `versionfeed/_config/versionfeed.yml`.
|
||||||
Two filters are applied on top of one another:
|
Two filters are applied on top of one another:
|
||||||
|
|
||||||
* `CachedContentFilter` provides caching of versions based on an identifier built up of the record ID and the
|
* `SilverStripe\VersionFeed\Filters\CachedContentFilter` provides caching of versions based on an identifier built up of the record ID and the
|
||||||
most recently saved version number. There is no configuration required for this class.
|
most recently saved version number. There is no configuration required for this class.
|
||||||
* `RateLimitFilter` provides rate limiting to ensure that requests to uncached data does not overload the
|
* `SilverStripe\VersionFeed\Filters\RateLimitFilter` provides rate limiting to ensure that requests to uncached data does not overload the
|
||||||
server. This filter will only be applied if the `CachedContentFilter` does not have any cached record
|
server. This filter will only be applied if the `SilverStripe\VersionFeed\Filters\CachedContentFilter` does not have any cached record
|
||||||
for a request.
|
for a request.
|
||||||
|
|
||||||
Either one of these can be replaced, added to, or removed, by adjusting the `SilverStripe\VersionFeed\VersionFeedController.dependencies`
|
Either one of these can be replaced, added to, or removed, by adjusting the `SilverStripe\VersionFeed\VersionFeedController.dependencies`
|
||||||
config to point to a replacement (or no) filter.
|
config to point to a replacement (or no) filter.
|
||||||
|
|
||||||
For smaller servers where it's reasonable to apply a strict approach to rate limiting the default
|
For smaller servers where it's reasonable to apply a strict approach to rate limiting the default
|
||||||
settings should be sufficient. The `RateLimitFilter.lock_bypage` config defaults to false, meaning that a
|
settings should be sufficient. The `SilverStripe\VersionFeed\Filters\RateLimitFilter.lock_bypage` config defaults to false, meaning that a
|
||||||
single limit will be applied to all URLs. If set to true, then each URL will have its own rate limit,
|
single limit will be applied to all URLs. If set to true, then each URL will have its own rate limit,
|
||||||
and on smaller servers with lots of concurrent requests this can still overwhelm capacity. This will
|
and on smaller servers with lots of concurrent requests this can still overwhelm capacity. This will
|
||||||
also leave smaller servers vulnerable to DDoS attacks which target many URLs simultaneously.
|
also leave smaller servers vulnerable to DDoS attacks which target many URLs simultaneously.
|
||||||
This config will have no effect on the `allchanges` method.
|
This config will have no effect on the `allchanges` method.
|
||||||
|
|
||||||
`RateLimitFilter.lock_byuserip` can be set to true in order to prevent requests from different users
|
`SilverStripe\VersionFeed\Filters\RateLimitFilter.lock_byuserip` can be set to true in order to prevent requests from different users
|
||||||
interfering with one another. However, this can provide an ineffective safeguard against malicious DDoS attacks
|
interfering with one another. However, this can provide an ineffective safeguard against malicious DDoS attacks
|
||||||
which use multiple IP addresses.
|
which use multiple IP addresses.
|
||||||
|
|
||||||
Another important variable is the `RateLimitFilter.lock_timeout` config, which is set to 5 seconds by default.
|
Another important variable is the `SilverStripe\VersionFeed\Filters\RateLimitFilter.lock_timeout` config, which is set to 5 seconds by default.
|
||||||
This should be increased on sites which may be slow to generate page versions, whether due to lower
|
This should be increased on sites which may be slow to generate page versions, whether due to lower
|
||||||
server capacity or volume of content (number of page versions). Requests to this page after the timeout
|
server capacity or volume of content (number of page versions). Requests to this page after the timeout
|
||||||
will not trigger any rate limit safeguard, so you should be sure that this is set to an appropriate level.
|
will not trigger any rate limit safeguard, so you should be sure that this is set to an appropriate level.
|
||||||
|
|
||||||
You can set the `ContentFilter.cache_lifetime` config in order to control the maximum age of the cache.
|
You can set the `SilverStripe\VersionFeed\Filters\ContentFilter.cache_lifetime` config in order to control the maximum age of the cache.
|
||||||
This is an integer value in seconds, and defaults to 300 (five minutes). Set it to 0 or null to make this
|
This is an integer value in seconds, and defaults to 300 (five minutes). Set it to 0 or null to make this
|
||||||
cache unlimited.
|
cache unlimited.
|
@ -1,9 +1,8 @@
|
|||||||
ar:
|
ar:
|
||||||
RSSHistory:
|
SilverStripe\VersionFeed\VersionFeed:
|
||||||
LABEL: 'اجعل التاريخ متاح للمشاهدة من قبل الجميع'
|
LABEL: 'اجعل التاريخ متاح للمشاهدة من قبل الجميع'
|
||||||
SINGLEPAGEFEEDTITLE: 'التحديثات و صلت ل s% من الصفحة'
|
SINGLEPAGEFEEDTITLE: 'التحديثات و صلت ل s% من الصفحة'
|
||||||
SITEFEEDTITLE: 'التحديثات إلى s%'
|
SITEFEEDTITLE: 'التحديثات إلى s%'
|
||||||
TITLECHANGED: 'تم تغيير العنوان:'
|
TITLECHANGED: 'تم تغيير العنوان:'
|
||||||
VersionFeed:
|
|
||||||
Warning: 'إن نشر التاريخ سوف يظهر التغييرات التى تملكها و التى كنت تمنعها من العرض على العامة.'
|
Warning: 'إن نشر التاريخ سوف يظهر التغييرات التى تملكها و التى كنت تمنعها من العرض على العامة.'
|
||||||
Warning2: 'إن تغيير إعدادات الدخول بهذه الطريقة كى تكون هذه الصفحة أو الصفحات التى تحتها تصبح معلنة<br>قد يؤدي الوصول إليها في نشر جميع التغييرات التاريخية على هذه الصفحات أيضا. من فضلك قم بمراجعة<br>"التاريخ العام" لهذا القطاع لكى يتم التأكد من أن المعلومات المقصودة فقط هى التى يتم الإفصاح عنها.'
|
Warning2: 'إن تغيير إعدادات الدخول بهذه الطريقة كى تكون هذه الصفحة أو الصفحات التى تحتها تصبح معلنة<br>قد يؤدي الوصول إليها في نشر جميع التغييرات التاريخية على هذه الصفحات أيضا. من فضلك قم بمراجعة<br>"التاريخ العام" لهذا القطاع لكى يتم التأكد من أن المعلومات المقصودة فقط هى التى يتم الإفصاح عنها.'
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
en:
|
en:
|
||||||
RSSHistory:
|
SilverStripe\VersionFeed\VersionFeed:
|
||||||
LABEL: 'Make history public'
|
LABEL: 'Make history public'
|
||||||
SINGLEPAGEFEEDTITLE: 'Updates to %s page'
|
SINGLEPAGEFEEDTITLE: 'Updates to %s page'
|
||||||
SITEFEEDTITLE: 'Updates to %s'
|
SITEFEEDTITLE: 'Updates to %s'
|
||||||
TITLECHANGED: 'Title has changed:'
|
TITLECHANGED: 'Title has changed:'
|
||||||
VersionFeed:
|
|
||||||
Warning: 'Publicising the history will also disclose the changes that have at the time been protected from the public view.'
|
Warning: 'Publicising the history will also disclose the changes that have at the time been protected from the public view.'
|
||||||
Warning2: 'Changing access settings in such a way that this page or pages under it become publicly<br>accessible may result in publicising all historical changes on these pages too. Please review<br>this section''s "Public history" settings to ascertain only intended information is disclosed.'
|
Warning2: 'Changing access settings in such a way that this page or pages under it become publicly<br>accessible may result in publicising all historical changes on these pages too. Please review<br>this section''s "Public history" settings to ascertain only intended information is disclosed.'
|
||||||
VersionFeedSiteConfig:
|
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||||
ALLCHANGES: 'All page changes'
|
ALLCHANGES: 'All page changes'
|
||||||
ALLCHANGESLABEL: 'Make global changes feed public'
|
ALLCHANGESLABEL: 'Make global changes feed public'
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
eo:
|
eo:
|
||||||
RSSHistory:
|
SilverStripe\VersionFeed\VersionFeed:
|
||||||
LABEL: 'Publikigu historion'
|
LABEL: 'Publikigu historion'
|
||||||
SINGLEPAGEFEEDTITLE: 'Ĝisdatigoj al paĝo %s'
|
SINGLEPAGEFEEDTITLE: 'Ĝisdatigoj al paĝo %s'
|
||||||
SITEFEEDTITLE: 'Ĝisdatigoj al %s'
|
SITEFEEDTITLE: 'Ĝisdatigoj al %s'
|
||||||
TITLECHANGED: 'Titolo estas ŝanĝita:'
|
TITLECHANGED: 'Titolo estas ŝanĝita:'
|
||||||
VersionFeed:
|
|
||||||
Warning: 'Publikigi la historion ankaŭ malkaŝos la ŝanĝojn ĝis tiam protektitajn kontraŭ publika vido.'
|
Warning: 'Publikigi la historion ankaŭ malkaŝos la ŝanĝojn ĝis tiam protektitajn kontraŭ publika vido.'
|
||||||
Warning2: 'Ŝanĝi la alirajn agordojn tiel ke ĉi tiu paĝo, aŭ paĝoj sub ĝi, fariĝas publike alireblaj <br>eble rezultigos ke publikiĝos ĉiuj historiaj ŝanĝoj en tiuj paĝoj. Bonvole rekonsideru <br> la sekcion "Publika historio" de ĉi tiu sekcio, por certigi ke nur intencita informo publikiĝu.'
|
Warning2: 'Ŝanĝi la alirajn agordojn tiel ke ĉi tiu paĝo, aŭ paĝoj sub ĝi, fariĝas publike alireblaj <br>eble rezultigos ke publikiĝos ĉiuj historiaj ŝanĝoj en tiuj paĝoj. Bonvole rekonsideru <br> la sekcion "Publika historio" de ĉi tiu sekcio, por certigi ke nur intencita informo publikiĝu.'
|
||||||
VersionFeedSiteConfig:
|
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||||
ALLCHANGES: 'Ĉiuj paĝaj ŝanĝoj'
|
ALLCHANGES: 'Ĉiuj paĝaj ŝanĝoj'
|
||||||
ALLCHANGESLABEL: 'Ĉieaj ŝanĝoj fluu en publikan'
|
ALLCHANGESLABEL: 'Ĉieaj ŝanĝoj fluu en publikan'
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
fi_FI:
|
fi_FI:
|
||||||
RSSHistory:
|
SilverStripe\VersionFeed\VersionFeed:
|
||||||
LABEL: 'Tee historiasta julkinen'
|
LABEL: 'Tee historiasta julkinen'
|
||||||
SINGLEPAGEFEEDTITLE: 'Päivityksiä %s sivuun'
|
SINGLEPAGEFEEDTITLE: 'Päivityksiä %s sivuun'
|
||||||
SITEFEEDTITLE: 'Päivityksiä: %s'
|
SITEFEEDTITLE: 'Päivityksiä: %s'
|
||||||
TITLECHANGED: 'Otsikko on muuttunut:'
|
TITLECHANGED: 'Otsikko on muuttunut:'
|
||||||
VersionFeed:
|
|
||||||
Warning: 'Historian julkaisu paljastaa myös muutokset, jotka ovat suojattu julkiselta tarkastelulta.'
|
Warning: 'Historian julkaisu paljastaa myös muutokset, jotka ovat suojattu julkiselta tarkastelulta.'
|
||||||
Warning2: 'Muutettaessa tämä tai sen alasivut julkisiksi,<br>voi toimenpide aiheuttaa myös kaiken muutoshistorian muuttumisen julkiseksi kyseisillä sivuilla. Ole hyvä<br>ja tarkista "Julkinen historia"-asetuksista, että vain haluttu tieto on julkaistuna.'
|
Warning2: 'Muutettaessa tämä tai sen alasivut julkisiksi,<br>voi toimenpide aiheuttaa myös kaiken muutoshistorian muuttumisen julkiseksi kyseisillä sivuilla. Ole hyvä<br>ja tarkista "Julkinen historia"-asetuksista, että vain haluttu tieto on julkaistuna.'
|
||||||
VersionFeedSiteConfig:
|
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||||
ALLCHANGES: 'Kaikki sivumuokkaukset'
|
ALLCHANGES: 'Kaikki sivumuokkaukset'
|
||||||
ALLCHANGESLABEL: 'Tee muutoksista julkisia'
|
ALLCHANGESLABEL: 'Tee muutoksista julkisia'
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
hr:
|
hr:
|
||||||
RSSHistory:
|
SilverStripe\VersionFeed\VersionFeed:
|
||||||
LABEL: 'Učini povijest dostupnu svima'
|
LABEL: 'Učini povijest dostupnu svima'
|
||||||
SINGLEPAGEFEEDTITLE: 'Ažuriranja za %s stranicu'
|
SINGLEPAGEFEEDTITLE: 'Ažuriranja za %s stranicu'
|
||||||
SITEFEEDTITLE: 'Ažuriranja za %s'
|
SITEFEEDTITLE: 'Ažuriranja za %s'
|
||||||
TITLECHANGED: 'Naziv se promijenio:'
|
TITLECHANGED: 'Naziv se promijenio:'
|
||||||
VersionFeed:
|
|
||||||
Warning: 'Objavom povijesti će se također otkriti promjene koje su u to vrijeme bili zaštićeni od očiju javnosti.'
|
Warning: 'Objavom povijesti će se također otkriti promjene koje su u to vrijeme bili zaštićeni od očiju javnosti.'
|
||||||
Warning2: 'Promjenom postavki pristupi na takav način će učiniti da ova stranica ili stranice ispod nje postanu javno<br>dostupne mogu rezultirati objavomm svih povijesnih promjena na tim stranicama također. Molimo pregledajte<br>podatke sekcije "Public history" da budete sigurni samo željene informacije da su prikazane.'
|
Warning2: 'Promjenom postavki pristupi na takav način će učiniti da ova stranica ili stranice ispod nje postanu javno<br>dostupne mogu rezultirati objavomm svih povijesnih promjena na tim stranicama također. Molimo pregledajte<br>podatke sekcije "Public history" da budete sigurni samo željene informacije da su prikazane.'
|
||||||
VersionFeedSiteConfig:
|
SilverStripe\VersionFeed\VersionFeedSiteConfig:
|
||||||
ALLCHANGES: 'Sve promjene stranice'
|
ALLCHANGES: 'Sve promjene stranice'
|
||||||
ALLCHANGESLABEL: 'Učini sveobuhvatne promjene feeda'
|
ALLCHANGESLABEL: 'Učini sveobuhvatne promjene feeda'
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
id:
|
id:
|
||||||
RSSHistory:
|
SilverStripe\VersionFeed\VersionFeed:
|
||||||
TITLECHANGED: 'Judul telah diubah:'
|
TITLECHANGED: 'Judul telah diubah:'
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
mi:
|
mi:
|
||||||
RSSHistory:
|
SilverStripe\VersionFeed\VersionFeed:
|
||||||
LABEL: 'Meinga kia tūmatanui te hītori'
|
LABEL: 'Meinga kia tūmatanui te hītori'
|
||||||
SINGLEPAGEFEEDTITLE: 'Ngā whakahou ki te whārangi %s'
|
SINGLEPAGEFEEDTITLE: 'Ngā whakahou ki te whārangi %s'
|
||||||
SITEFEEDTITLE: 'Ngā whakahou ki te %s'
|
SITEFEEDTITLE: 'Ngā whakahou ki te %s'
|
||||||
TITLECHANGED: 'Kua hurihia te taitara:'
|
TITLECHANGED: 'Kua hurihia te taitara:'
|
||||||
VersionFeed:
|
|
||||||
Warning: 'Mā te whakarite kia tūmatanui te hītori ka whakaaturia hoki ngā huringa o mua tērā i hunaia i te tirohanga tūmatanui.'
|
Warning: 'Mā te whakarite kia tūmatanui te hītori ka whakaaturia hoki ngā huringa o mua tērā i hunaia i te tirohanga tūmatanui.'
|
||||||
Warning2: 'Mā te huri i ngā tautuhinga uru kia noho wātea <br>tūmatanui ai tēnei whārangi, ngā whārangi rānei i raro i taua whārangi, tērā pea ko te mutunga iho ko te wātea tūmatanui o ngā huringa hītori katoa i aua whārangi. Me arotake<br>ngā tautuhinga "Hītori tūmatanui" o tēnei wāhanga kia mōhio ai ka whakaaturia anake ngā mōhiohio ka hiahiatia.'
|
Warning2: 'Mā te huri i ngā tautuhinga uru kia noho wātea <br>tūmatanui ai tēnei whārangi, ngā whārangi rānei i raro i taua whārangi, tērā pea ko te mutunga iho ko te wātea tūmatanui o ngā huringa hītori katoa i aua whārangi. Me arotake<br>ngā tautuhinga "Hītori tūmatanui" o tēnei wāhanga kia mōhio ai ka whakaaturia anake ngā mōhiohio ka hiahiatia.'
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
zh:
|
zh:
|
||||||
RSSHistory:
|
SilverStripe\VersionFeed\VersionFeed:
|
||||||
LABEL: '将历史记录公开'
|
LABEL: '将历史记录公开'
|
||||||
SINGLEPAGEFEEDTITLE: '更新至 %s 页面'
|
SINGLEPAGEFEEDTITLE: '更新至 %s 页面'
|
||||||
SITEFEEDTITLE: '更新至 %s'
|
SITEFEEDTITLE: '更新至 %s'
|
||||||
TITLECHANGED: '标题已更改:'
|
TITLECHANGED: '标题已更改:'
|
||||||
VersionFeed:
|
|
||||||
Warning: '发布历史记录还会在公开视图中显示受保护事件内进行的改动。'
|
Warning: '发布历史记录还会在公开视图中显示受保护事件内进行的改动。'
|
||||||
Warning2: '用这种方式更改访问设置会使得本页及下级页面变为公开的<br>可能还会使得这些页面的所有变动历史记录也变为公开的。请查阅<br>本节的“公开历史记录”设置,确保只将需要的信息披露出来。'
|
Warning2: '用这种方式更改访问设置会使得本页及下级页面变为公开的<br>可能还会使得这些页面的所有变动历史记录也变为公开的。请查阅<br>本节的“公开历史记录”设置,确保只将需要的信息披露出来。'
|
||||||
|
@ -26,7 +26,7 @@ class VersionFeed extends SiteTreeExtension
|
|||||||
|
|
||||||
public function updateFieldLabels(&$labels)
|
public function updateFieldLabels(&$labels)
|
||||||
{
|
{
|
||||||
$labels['PublicHistory'] = _t('RSSHistory.LABEL', 'Make history public');
|
$labels['PublicHistory'] = _t(__CLASS__ . '.LABEL', 'Make history public');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -99,7 +99,7 @@ class VersionFeed extends SiteTreeExtension
|
|||||||
$version->DiffTitle->setValue(
|
$version->DiffTitle->setValue(
|
||||||
sprintf(
|
sprintf(
|
||||||
'<div><em>%s</em> ' . $diffTitle . '</div>',
|
'<div><em>%s</em> ' . $diffTitle . '</div>',
|
||||||
_t('RSSHistory.TITLECHANGED', 'Title has changed:')
|
_t(__CLASS__ . '.TITLECHANGED', 'Title has changed:')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$changed = true;
|
$changed = true;
|
||||||
@ -189,7 +189,7 @@ class VersionFeed extends SiteTreeExtension
|
|||||||
));
|
));
|
||||||
|
|
||||||
$warning = _t(
|
$warning = _t(
|
||||||
'VersionFeed.Warning',
|
__CLASS__ . '.Warning',
|
||||||
"Publicising the history will also disclose the changes that have at the time been protected " .
|
"Publicising the history will also disclose the changes that have at the time been protected " .
|
||||||
"from the public view."
|
"from the public view."
|
||||||
);
|
);
|
||||||
@ -198,7 +198,7 @@ class VersionFeed extends SiteTreeExtension
|
|||||||
|
|
||||||
if ($this->owner->CanViewType!='Anyone') {
|
if ($this->owner->CanViewType!='Anyone') {
|
||||||
$warning = _t(
|
$warning = _t(
|
||||||
'VersionFeed.Warning2',
|
__CLASS__ . '.Warning2',
|
||||||
"Changing access settings in such a way that this page or pages under it become publicly<br>" .
|
"Changing access settings in such a way that this page or pages under it become publicly<br>" .
|
||||||
"accessible may result in publicising all historical changes on these pages too. Please review<br>" .
|
"accessible may result in publicising all historical changes on these pages too. Please review<br>" .
|
||||||
"this section's \"Public history\" settings to ascertain only intended information is disclosed."
|
"this section's \"Public history\" settings to ascertain only intended information is disclosed."
|
||||||
|
@ -84,7 +84,7 @@ class VersionFeedController extends Extension
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Generate the output.
|
// Generate the output.
|
||||||
$title = sprintf(_t('RSSHistory.SINGLEPAGEFEEDTITLE', 'Updates to %s page'), $this->owner->Title);
|
$title = sprintf(_t(VersionFeed::class . '.SINGLEPAGEFEEDTITLE', 'Updates to %s page'), $this->owner->Title);
|
||||||
$rss = new RSSFeed($entries, $this->owner->request->getURL(), $title, '', 'Title', '', null);
|
$rss = new RSSFeed($entries, $this->owner->request->getURL(), $title, '', 'Title', '', null);
|
||||||
$rss->setTemplate('Page_changes_rss');
|
$rss->setTemplate('Page_changes_rss');
|
||||||
return $rss->outputToBrowser();
|
return $rss->outputToBrowser();
|
||||||
@ -165,7 +165,7 @@ class VersionFeedController extends Extension
|
|||||||
RSSFeed::linkToFeed(
|
RSSFeed::linkToFeed(
|
||||||
$this->owner->Link('changes'),
|
$this->owner->Link('changes'),
|
||||||
sprintf(
|
sprintf(
|
||||||
_t('RSSHistory.SINGLEPAGEFEEDTITLE', 'Updates to %s page'),
|
_t(VersionFeed::class . '.SINGLEPAGEFEEDTITLE', 'Updates to %s page'),
|
||||||
$this->owner->Title
|
$this->owner->Title
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -194,6 +194,6 @@ class VersionFeedController extends Extension
|
|||||||
|
|
||||||
public function linkToAllSitesRSSFeedTitle()
|
public function linkToAllSitesRSSFeedTitle()
|
||||||
{
|
{
|
||||||
return sprintf(_t('RSSHistory.SITEFEEDTITLE', 'Updates to %s'), SiteConfig::current_site_config()->Title);
|
return sprintf(_t(VersionFeed::class . '.SITEFEEDTITLE', 'Updates to %s'), SiteConfig::current_site_config()->Title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ class VersionFeedSiteConfig extends DataExtension
|
|||||||
|
|
||||||
public function updateFieldLabels(&$labels)
|
public function updateFieldLabels(&$labels)
|
||||||
{
|
{
|
||||||
$labels['AllChangesEnabled'] = _t('VersionFeedSiteConfig.ALLCHANGESLABEL', 'Make global changes feed public');
|
$labels['AllChangesEnabled'] = _t(VersionFeedSiteConfig::class . '.ALLCHANGESLABEL', 'Make global changes feed public');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateCMSFields(FieldList $fields)
|
public function updateCMSFields(FieldList $fields)
|
||||||
@ -37,9 +37,9 @@ class VersionFeedSiteConfig extends DataExtension
|
|||||||
$fields->addFieldToTab(
|
$fields->addFieldToTab(
|
||||||
'Root.Access',
|
'Root.Access',
|
||||||
FieldGroup::create(new CheckboxField('AllChangesEnabled', $this->owner->fieldLabel('AllChangesEnabled')))
|
FieldGroup::create(new CheckboxField('AllChangesEnabled', $this->owner->fieldLabel('AllChangesEnabled')))
|
||||||
->setTitle(_t('VersionFeedSiteConfig.ALLCHANGES', 'All page changes'))
|
->setTitle(_t(VersionFeedSiteConfig::class . '.ALLCHANGES', 'All page changes'))
|
||||||
->setDescription(_t(
|
->setDescription(_t(
|
||||||
'VersionFeed.Warning',
|
VersionFeed::class . '.Warning',
|
||||||
"Publicising the history will also disclose the changes that have at the time been protected " .
|
"Publicising the history will also disclose the changes that have at the time been protected " .
|
||||||
"from the public view."
|
"from the public view."
|
||||||
))
|
))
|
||||||
|
Loading…
Reference in New Issue
Block a user